Thread: root cat
View Single Post
  #7  
Old 10-28-2009, 08:09 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: root cat

How about this

<ul>
{foreach from=$allsubcategories item=c}
{if $c.parentid eq "255"}
<li>$c.category</li>
{/if}
{/foreach}
</ul>

If you don't have $allsubcategories this is how to get them (I can't remember the thread)

add to /include/categories.php at the end before subcategories and cat assigns
Code:
function func_getallsubcat() { $raj = func_get_categories_list("",true,"all"); $raj1 = $raj['all_categories']; $ll = array(); foreach ($raj1 as $k=>$val) { if($val['parentid']!="0") { $ll[$val['parentid']][]=$val; } } return $ll; } $smarty->assign("allsubcategories",func_getallsubcat());
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote