Hi to everyone!
I'm trying to get work correctly categories and subcategories.
Now my categories.tpl is:
PHP Code:
{* $Id: categories.tpl,v 1.26 2005/11/17 06:55:37 max Exp $ *}
<h3>{$lng.lbl_categories}</h3>
{if $active_modules.Fancy_Categories ne ""}
{include file="modules/Fancy_Categories/categories.tpl"}
{assign var="fc_cellpadding" value="0"}
{else}
{if $config.General.root_categories eq "Y"}
{foreach from=$categories item=c}
<tr align="left"><td><a href="home.php?cat={$c.categoryid}" class="mainlevel">{$c.category}</a></td></tr>
{foreach from=$allcategories item=cat}
{if $cat.parentid eq $c.categoryid}
<tr align="left"><td><div style="padding-left: 4px"><img src="{$SkinDir}/images/indent1.png" alt="" /><a href="home.php?cat={$cat.categoryid}" class="sublevel" >{$cat.category}</a></div></td></tr>
{/if}
{/foreach}
{/foreach}
{else} {foreach from=$subcategories item=c key=catid}
<tr align="left"><td><a href="home.php?cat={$catid}" class="sublevel">{$c.category}</a></td></tr>
{/foreach}
{/if}
{/if}
The categories works fine but i have 2 big problems that i'm not able to solve:
1- When i go to a category or to a subcategory i'd like to have a css class active (like the hover) to highlight that we are in that category / subcategory
Here you can see the category
Not Highlight:
http://www.toyshunter.it/store/chogokin-c-3.html ( see the menu on the right Categorie)
2- When i go to a subcategory "magically" the subcategory on the menu disappearing! I cannot understand why!
Here you can see the magic disappearing of subcategories:
http://www.toyshunter.it/store/bandai-soul-of-chogokin-c-11.html ( see the menu on the right Categorie)
Thanks for your help!