Including Templates
Posted: Tue Jan 23, 2007 8:32 pm
Hi,
i've tried a search and couldn't find the answer i'm after.
I use Smarty on a regular basis, and use common header and footer templates, so a typical page will be of the form:
{include file='head.tpl' title='Welcome'}
This is the content
{include file='base.tpl}
I see cmsms stores in the database, how can you create common headers and footers? The project i'm doing requires this functionality as there will be pages with different layouts but the top and bottom will be the same, and doing a site redesign would require updating many templates instead of just the header and footer.
I'm wanting to implement these as templates, creating them as php would be easy enough, but totally depletes the purpose of using smarty in the first place.
Any pointers would be appreciated thanks.
i've tried a search and couldn't find the answer i'm after.
I use Smarty on a regular basis, and use common header and footer templates, so a typical page will be of the form:
{include file='head.tpl' title='Welcome'}
This is the content
{include file='base.tpl}
I see cmsms stores in the database, how can you create common headers and footers? The project i'm doing requires this functionality as there will be pages with different layouts but the top and bottom will be the same, and doing a site redesign would require updating many templates instead of just the header and footer.
I'm wanting to implement these as templates, creating them as php would be easy enough, but totally depletes the purpose of using smarty in the first place.
Any pointers would be appreciated thanks.