Page 2 of 2
Posted: Sat Apr 10, 2004 9:04 pm
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.
Posted: Sat Apr 10, 2004 9:17 pm
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)
Posted: Mon Apr 12, 2004 10:20 pm
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/
Posted: Mon Apr 12, 2004 11:42 pm
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.