Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Show only sub-categories in left sidebar?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-29-2011, 06:16 PM
 
hollaratbear hollaratbear is offline
 

Advanced Member
  
Join Date: Nov 2009
Posts: 37
 

Default Show only sub-categories in left sidebar?

I'm desiging a store with a horizontal menu for my root categories. Once one is clicked, I'd like to display only the corresonding sub-categories in the left sidebar. Anyone got a simple way of accomplishing this?
__________________
hollaratbear
Xcart Gold 4.2.1 Newbie
Reply With Quote
  #2  
Old 05-29-2011, 08:32 PM
 
hollaratbear hollaratbear is offline
 

Advanced Member
  
Join Date: Nov 2009
Posts: 37
 

Default Re: Show only sub-categories in left sidebar?

New problem. Nevermind the previous...changed categories.tpl to this

Code:
{* $Id: categories.tpl,v 1.33 2008/11/06 16:53:53 max Exp $ vim: set ts=2 sw=2 sts=2 et: *} {capture name=menu} {if $active_modules.Fancy_Categories} {include file="modules/Fancy_Categories/categories.tpl"} {assign var="additional_class" value="menu-fancy-categories-list"} {else} <ul> {foreach from=$subcategories item=subcat} <li> <a href="home.php?cat={$subcat.categoryid}">{$subcat.category|escape}</a> {/foreach} </ul> {assign var="additional_class" value="menu-categories-list"} {/if} {/capture} {include file="customer/menu_dialog.tpl" title=$lng.aisles content=$smarty.capture.menu}

Now the problem is that when I click a menu item that has no sub-categories, my menu disappears. I guess what I'm looking for is a statement that says "if there are no subcategories, show all subcategories of this subcategory's parent. Does that make sense? If I click a 2nd level that has only products and no 3rd level categories, I only want to display the other 2nd level categories of the parent in categories.tpl. Can anyone help?
__________________
hollaratbear
Xcart Gold 4.2.1 Newbie
Reply With Quote
  #3  
Old 06-16-2011, 06:42 PM
 
hollaratbear hollaratbear is offline
 

Advanced Member
  
Join Date: Nov 2009
Posts: 37
 

Default Re: Show only sub-categories in left sidebar?

For anyone looking for something similar....horizontal category bar with only the current subcats for each in a sidebar..check this post - http://forum.x-cart.com/showthread.php?t=58751
__________________
hollaratbear
Xcart Gold 4.2.1 Newbie
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 05:11 PM.

   

 
X-Cart forums © 2001-2020