Banners based on category?
I am setting up an ad banner just before the {$mid_data} in the tiki.tpl file in my site.
I am doing this so a banner shows up in every page of the site just before the content.
The problem is I would like to use different banner zones for each category of my site.
Here is what I am doing:
{if $categ_info.name ne ''}
{banner zone='{$categ_info.name}'}
{else}
{banner zone='Default'}
{/if}
The first problem is the $categ_info.name variable (which seems to be used in the header.tpl) seems to be always empty, is there a more reliable variable that can be accessed to determine the content category? BTW: The {CATPATH(top=>no)}{CATPATH} does not seem to work in the tiki.tpl?
The second problem I may encounter is using {} tags within {} tags, I am guessing that is not going to work, how would I get around that?
There may also be a third problem to this in the future, for now my categories in my site have no sub categories and only one category per item if any. So using category names as zone names for banners will work. However if in the future I may like to have more than one category for an item or sub categories, how would the banner plugin handle that?