[SOLVED] Creating many templates from one?
Posted: Fri May 01, 2009 2:14 pm
Hi All,
Not sure if this has been answered.
Basically I have a page template which has 5 components which make up the design:
1 - Left hand navigation
2 - Left news block
3 - Content block wide
4 - Content block
5 - Right hand navigation
The header and footer are the same on every page.
Is there a way I can call different elements that make the page, depending on the page alias, instead of having to create serveral different templates to cover the variations.
So on my template I would have some code like this:
{If page_alias == 'club, training, courses'}
xxxxx
xxxx
xxxx
{elseif page_alis == 'news, gallery, blog'}
etc......
{/if}
I thought I could use Smarty Tags, but am not quite sure how they work?
Also the News components for each page would need to display a different category, does anyone know how this would be possible to do?
Thanks
Charmie
Not sure if this has been answered.
Basically I have a page template which has 5 components which make up the design:
1 - Left hand navigation
2 - Left news block
3 - Content block wide
4 - Content block
5 - Right hand navigation
The header and footer are the same on every page.
Is there a way I can call different elements that make the page, depending on the page alias, instead of having to create serveral different templates to cover the variations.
So on my template I would have some code like this:
{If page_alias == 'club, training, courses'}
xxxxx
xxxx
xxxx
{elseif page_alis == 'news, gallery, blog'}
etc......
{/if}
I thought I could use Smarty Tags, but am not quite sure how they work?
Also the News components for each page would need to display a different category, does anyone know how this would be possible to do?
Thanks
Charmie