View Single Post
  #1  
Old 09-27-2008, 09:14 AM
 
techspaces techspaces is offline
 

Advanced Member
  
Join Date: Aug 2008
Posts: 95
 

Default category menu syntax

I'm creating custom menus for landing pages and I need the categories menu to only parse a specific subcategory. What I don't know is how to alter the syntax to limit to a specific category id. Here's the code I've got so far.

Code:
<ul class="categoryitems"> {foreach from=$c.subcats item=sc name=cm2} {if $sc.subcats eq ""} <li><a href="home.php?cat={$sc.categoryid}">{$sc.category}</a></li> {else} <li><a href="#" class="subexpandable">{$sc.category}</a> <ul class="subcategoryitems" style="margin-left: 15px"> {foreach from=$sc.subcats item=ssc name=ssc name=cm3} <li><a href="home.php?cat={$ssc.categoryid}">{$ssc.category}</a></li> {/foreach} </ul> </li> {/if} {/foreach} </ul>
__________________
X-Cart 4.1.9 | PHP 5.2.6 | MySQL 5.0.51a | Apache 1.3.51
Reply With Quote