|
|
|
|
![]() ![]() |
Aug 19 2005, 01:21 PM
Post
#1
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 535 Joined: 14-February 05 From: Oslo, Norway Member No.: 3,759 |
Let's say I have the same PHP script on all pages, with the same menus, footer etc, but with different content. The PHP page is called "Sitename - ", and the included pages (which is in HTML) is called "Thingy". I want it to load both titles, so the title will be "Sitename - Thingy". The second page have the same PHP code (with the normal title, "Sitename - "), but is called "Why not?". This one have the title "Sitename - Why not?".
Hope you understand what I want, and that you can help me. |
|
|
|
Aug 19 2005, 01:36 PM
Post
#2
|
|
|
Incest is a game the whole family can play. ![]() Group: [MODERATOR] Posts: 1,227 Joined: 11-February 05 From: Heaven Member No.: 3,709 |
So you have a header file containing all of the content between the <head> </head> tags but you want to make it so that you can still include the file but have different content between the <title></title> tags?
If I am right, this is how I would do it, but it requires php: Your header.php file CODE <html> <head> <title> Sitename - <? echo $pagetitle; ?> </title> </head> <!-- Some over stuff --> An example webpage CODE <? $pagetitle = "Black Widgets"; include "header.php"; /* Some other stuff */ ?> Now between the <title> tags on our webpage there is Sitename - Black Widgets. I use the same idea on my website Edit: Mistyped some code This post has been edited by cmatcmextra: Aug 19 2005, 01:38 PM |
|
|
|
Aug 19 2005, 02:37 PM
Post
#3
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 362 Joined: 2-March 05 From: The Netherlands Member No.: 4,097 |
Great to see other people who know enough about php too
(it may be bad for my hosting credits tho |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 7th October 2008 - 09:48 PM |