View Single Post
  #1  
Old 12-02-2005, 01:17 PM
 
malestro malestro is offline
 

Newbie
  
Join Date: Dec 2005
Posts: 1
 

Default "Sticky" Category and Subcategory menus

Hello,

I'm trying to find a mod to catalog.tpl that let's me have a persistent menu with categories & subcategories -- and when clicking on a product. The stock version which uses config.General.root_categories eq "Y", only shows 1st tier categories.

My first attempt (below) shows first level, and the "current" level, but loses the subcategory detail when you click on any product within the last category.


=============================================
{* $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"}

{*primary*}
{section name=cat_num loop=$categories}
<FONT class="CategoriesList">{$categories[cat_num].category}</FONT>

{section name=position loop=$location}
{if $location[position].0 eq $categories[cat_num].category }

{*secondary*}
{if $cat ne 0}
{section name=subcat_num loop=$subcategories}
<FONT class="CategoriesList">{$subcategories[subcat_num].category}</FONT>

{/section}
{/if}
{/if

{/section}
{/section}
{/if}
{/if}
{/capture}
{ include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu }

=============================================
Any thoughts?
__________________
-: Life\'s too short for bad coffee :-
Reply With Quote