I need a certain tpl file to be shown only when a particular category is loaded. How do I go about it using the if elseif stuff? Is this possible using the client software?
Your help would be much appreciated.
Thanks.
Ive only just seen this post, so you might already have a solution.
In PHP, you can use a variable for the include file call, but in Smarty, you cant, so as you suggested, if, elseif is your only solution.
You do it like this:
{if $something == 'somethingelse'}
{include file="thisfile.tpl"}
{elseif $something == 'someotherthing'}
{include file="thatfile.tpl"}
{else}
{include file="thisfilehere.tpl"}
{/if}
Smarty documentation on if, else, elseif can be found here:
http://www.smarty.net/manual/en/language.function.if.php