mogwai

msg:1278583 | 11:01 pm on Nov 5, 2003 (gmt 0) |
Both approaches effectively do the same thing, ie include data from other files to build a page. I always opt for whatever requires the least amount of work to achieve :) In this case that would be using one template and grabbing the content from a data source of some description. The main reason being that this removes the content from the presentation and makes re-designs and updates much easier.
|
coopster

msg:1278584 | 11:10 pm on Nov 5, 2003 (gmt 0) |
mick, there was recently a discussion similar to this on this thread: [webmasterworld.com...]
|
jatar_k

msg:1278585 | 2:04 am on Nov 6, 2003 (gmt 0) |
Welcome to WebmasterWorld mick shrimpton, I guess everyone is forgetting their manners ;) coopster linked to a very good thread. I don't think it is, necessarily, a question of what is better. It depends on what works better for you mostly. One thing I would say though. I try to keep all query strings out of my urls unless absolutely unavoidable. In your first example I would embed the section or pageid/pagename in the code. $content=thispage; include "template.php"; Most often I go with the second option. Include the header, content and then include the footer. I also usually maintain title/meta tags on each page so I can customize them for each one.
|
shady

msg:1278586 | 2:15 am on Nov 6, 2003 (gmt 0) |
I would always go for "including" anything that is likely to be duplicated across my system. Header and footer are usually (certainly on my sites) the same throughout, therefore I would always include header.php and footer.php. This approach makes it very easy to change navigation (add another page to your system for example), or add tracking code to the footer.... many reasons I would take this approach. Best regards Shady
|
mick shrimpton

msg:1278587 | 4:23 am on Nov 6, 2003 (gmt 0) |
Thanks for the welcome and the advice.
|
|