![]() |
Different head.tpl for each category
Hello,
I would like to know how do i do to, when a customer choose a category to bring a head.tpl matching that category, i want to load a matching head.tpl for each main category. Stefan |
I would suggest that the easiest thing to do is to keep head.tpl, but replace its content with Smarty code that reads the $cat variable and then includes the appropriate file (be it .tpl or straight .html) depending on that value.
|
Category - Head
Hello,
Great, but how do i do that , any example ??? Stefan |
You may want to start by reading the Smarty Docs for a decent idea of what you are capable of doing with a tpl file.
In head.tpl, you'll have the $cat variable available to you. You can use that with if/elseif statements to determine what category you are in and then use the smarty include statement to display the contents of another tpl file or html. In a case like this all you would have in head.tpl would be a lot of if statements for each category followed by include statements. All output to the browser would be in the various files you include. |
All times are GMT -8. The time now is 07:24 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.