Using templates and CSS
Posted: Fri Nov 21, 2008 4:58 am
Hey there,
I'm a computer science student on summer holidays messing around with a pet PHP project and have a question regarding the use of templates that I think fit in this section.
I have chosen to rebuild a existing application provided by a PHP guide I just completed, in the hope of learning a few design techniques. It uses PEAR templates to separate content from style, for example it has a main template that sets up headers and a navigation bar and then there are a few different templates for the various types of pages required for the website. When a page is opened the specific page type template is then merged with the main template and the content inputed through php block manipulation. My question is, why have this main template that only seems to set up things that are present on every page, why not just include this using CSS? Basically what can be archived by templates that cant be done by CSS?
Thank for your help guys!
I'm a computer science student on summer holidays messing around with a pet PHP project and have a question regarding the use of templates that I think fit in this section.
I have chosen to rebuild a existing application provided by a PHP guide I just completed, in the hope of learning a few design techniques. It uses PEAR templates to separate content from style, for example it has a main template that sets up headers and a navigation bar and then there are a few different templates for the various types of pages required for the website. When a page is opened the specific page type template is then merged with the main template and the content inputed through php block manipulation. My question is, why have this main template that only seems to set up things that are present on every page, why not just include this using CSS? Basically what can be archived by templates that cant be done by CSS?
Thank for your help guys!