View Single Post
  #32  
Old 09-25-2005, 10:38 AM
 
Mr Bob Mr Bob is offline
 

Senior Member
  
Join Date: Jul 2005
Posts: 199
 

Default

Code:
{* $Id: left_subcategories.tpl,v 1.00.0.0 2005/11/24 04:10:00 mclap Exp $ *} <div id="siteBodyLeftSubCats"> <div id="siteBodyLeftSubCatsTitle"> <div id="siteBodyLeftSubCatsTitleLeft"></div> {$current_category_top.category} <div id="siteBodyLeftSubCatsTitleRight"></div> </div> <ul class="subNav"> {section name=cat_num loop=$allcategories} {if $allcategories[cat_num].parentid eq $location[1].1|replace:"home.php?cat=":""} <li class="subNavLink">{ $allcategories[cat_num].category|escape } {if $config.Appearance.count_products eq "Y"}{if $subcat.product_count}({ $subcat.product_count }){/if}{/if} {/if} {/section} [/list] <div id="siteBodyLeftSubCatsLL"></div> <div id="siteBodyLeftSubCatsLR"></div> </div>

First, my code above displays all the time, everytime. I need an if statement that will only display after you have clicked on a category. Once you click on a category, the code above should display.

Next, I need to name the subcategory that they selected. I tried {$current_category_top.category} which didn't work. Then I tried {$current_category.category} which just displays the name of the item you are on. If I click on a sub cat, it will display the sub cat name, then if I click on a product, it will display the product name. I only want it to display the sub cat name for the 2nd level sub cat.
__________________
Product: X-Cart Gold
Current version: 4.0.14

Additional Mods: X-Affiliate
Reply With Quote