View Single Post
  #1  
Old 03-30-2011, 07:10 PM
 
dennisvon dennisvon is offline
 

Member
  
Join Date: Feb 2006
Posts: 21
 

Default How to List Sub Categories in a Dropdown Menu

How to program a dropdown menu that lists the subcategories of category 299?

With the current dropdown when on home page the menu lists all root level categories,

but when on the page that lists the subcategories items of 299, then the dropdown menu lists only the subcategories.

I don't know the logic to make this work, can anyone help?

Code that I am using.

<select name="listCategories" onchange="window.location=this.options[selectedIndex].value">
<option value=""><font class="VertMenuItems">Select A Cigary</font></option>
{foreach from=$categories_menu_list item=c name=categories}
{if $c.order_by = 299 && $c.product_count ne 0}
<option value="home.php?cat={$c.categoryid}">{$c.category} </option>
{/if}
{/foreach}
</select>

</form>
__________________
Version 4.4.2
www.smokeinn.com

Last edited by dennisvon : 03-30-2011 at 07:11 PM. Reason: minor change
Reply With Quote