View Single Post
  #27  
Old 01-05-2007, 11:28 AM
 
dtpub dtpub is offline
 

Member
  
Join Date: May 2006
Posts: 25
 

Default Re: ALWAYS display first level subcats beneath root cats

Hope someone is still looking at this one.

I used this code in the /customer/categories.tpl.

It does display the subcategories under the Main Categories as hoped.

The first issue is, that the subcat list items are not linked to the subcategories pages.

The second issue is that I have made the menu column wider, and the sub cat list does not have line breaks, so they run on as one line.

Can some one help with this?

Thanks,
Gary

Here is the code I'm using:


{* $Id: categories.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *}
{capture name=menu}
{if $active_modules.Fancy_Categories ne ""}
{include file="`$fancycategories_config.modules_path`/fancy_categories.tpl"}
{else}
{if $config.General.root_categories eq "Y"}
{section name=cat_num loop=$categories}
<FONT class="CategoriesList"><A href="home.php?cat={$categories[cat_num].categoryid}" class="VertMenuItems">{$categories[cat_num].category}</A></FONT><BR>
{section name=subcat loop=$allcategories}
{if $allcategories[subcat].parentid eq $categories[cat_num].categoryid}
{$allcategories[subcat].category}
{/if}
{/section}
{/section}
{else}
{section name=cat_num loop=$subcategories}
<FONT class="CategoriesList"><A href="home.php?cat={$subcategories[cat_num].categoryid}" class="VertMenuItems">{$subcategories[cat_num].category}</A></FONT><BR>
{/section}
{/if}
{/if}
{/capture}
{ include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu }
__________________
v4.1.6 Unix OSX 10.5.6 PHP 5.x
MySQL various versions
Reply With Quote