Jump to content

 

shiftshane

Member Since 10 Jan 2006
Offline Last Active Jan 11 2006 05:57 AM
-----

Topics I've Started

Different Templates for Different Sections

11 January 2006 - 05:56 AM

Hello,

For our site, we would like to use different template files for different areas of the site. For instance, when you go to the category called Bands it would load a different template file. Then, when you clicked on a subcategory of Bands, it would load another template.

The only way I have thought of to do this as of yet is to use if statements against the variables in the query string (within the Smarty templates). For instance:

{if ($smarty.get.target == 'categories') && ($smarty.get.category_id == 156)}
This is the Bands category w00t!!
{/if}

Is there a better way to do this that you can think of? Doing it this way will take a lot more effort, as I will have to use if's in a bunch of places, in a bunch of tpl files.

Any suggestions would be much appreciated!

So far we are loving CS-Cart!

Sincerely,
Shane