View Single Post
  #1  
Old 07-09-2007, 08:54 AM
 
creativearc creativearc is offline
 

Advanced Member
  
Join Date: May 2007
Posts: 34
 

Default How do I... Question regarding Category List

I have added some javascript effects to my category list. It works great, except for a few things. What happens with the javascript - is the subcategories are displayed in the left category list when they click on a category. The links work great off the home page, but when someone gets to a subcategory page, then it falls apart a bit.

This code needs to work on any page, and it is screwed up whenever there is a ?cat=(number). Any ideas how to fix this? (this is a snippet from the /customer/categories.tpl)

Code:
{if $config.General.root_categories eq "Y"} {foreach from=$categories item=c} <dt class="category-menu" style="cursor: pointer">{$c.category}</dt> {if $subcategories} <dt class="subcategory-menu"> {foreach from=$subcategories item=c key=catid} <a href="home.php?cat={$catid}" class="VertMenuItems">&nbsp;&nbsp;&nbsp;&nbsp;- {$c.category}</a><br /> {/foreach} </dt> {/if} {/foreach} {else} {foreach from=$subcategories item=c key=catid} <font class="CategoriesList"><a href="home.php?cat={$catid}" class="VertMenuItems">{$c.category}</a></font><br /> {/foreach} {/if}
__________________
CreativeArc
---------------
X-Cart Pro
Version: 4.1.8
Reply With Quote