View Single Post
  #1  
Old 11-25-2007, 11:35 AM
 
pmalerba pmalerba is offline
 

Member
  
Join Date: Sep 2007
Posts: 17
 

Question Highlight categories and subcategories

Hi to everyone!

I'm trying to get work correctly categories and subcategories.

Now my categories.tpl is:

PHP Code:
{* $Idcategories.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!
__________________
X-Cart v 4.1.8
X-Cart v 4.1.11
Reply With Quote