View Single Post
  #7  
Old 11-07-2005, 12:21 PM
  TelaFirma's Avatar 
TelaFirma TelaFirma is offline
 

X-Adept
  
Join Date: Nov 2002
Location: North Carolina USA
Posts: 930
 

Default

Forget Fancy Categories.
  • Causes Code Bloat
  • Will not really accomplish what you need

If all you have is two levels (category and category///subcategory) then try this code:

Code:
{section name=cat_num loop=$allcategories} {if $allcategories[cat_num].parentid eq 0} <font class="CategoriesList">{$allcategories[cat_num].category}</font> {/if} {if $allcategories[cat_num].subcategory_count gt 0} {section name=sub_num loop=$allcategories} {if $allcategories[sub_num].parentid eq $allcategories[cat_num].categoryid} <font class="SubCategoriesList"> - {$allcategories[sub_num].category}</font> {/if} {/section} {/if} {/section}

You will need to define the two classes used (CategoriesList and SubCategoriesList) in your CSS file.
Reply With Quote