Page Titles in PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Yep, but what if you wanted to change the title as a simple example. Your way would require changing the file in every theme. If you separate out the html then you only have to change the title in one place for the all the themes to pick up the change.
Aleister
Forum Newbie
Posts: 20
Joined: Wed Apr 07, 2004 5:43 pm

Post by Aleister »

The theme file would not have to contain the title.. and would not need changing.. the only file I would have to change is the file for the page I want a new title on.

the template file wouldnt even need to have anything in it... the header and footer php files can actually contain the layout etc..

but if i wanted to move the layout stuff to the theme file, i could.. but it would not have anything page specific on it.. it seems to be working fine in a test i had going.. i suppose as long as it's working its ok ?

I could send you it zipped if you really want to see.. i don't know if i am making sense now :)

Edit : (links taken out - out of date)
Last edited by Aleister on Mon Apr 12, 2004 10:21 pm, edited 1 time in total.
Aleister
Forum Newbie
Posts: 20
Joined: Wed Apr 07, 2004 5:43 pm

Post by Aleister »

Thanks for all the help everyone! I converted one of my pages to a css/php based system. Here it is: http://www.templeofdagon.com/design/
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

I have blocks in separate classes but the blocks all listen to each other using the Observer pattern - a "MainContent" block can message a HeadHtml block (all the html between the <head> tags) with the title & keywords etc.

More info in the Queue code snippet.
Post Reply