Categories Menu - Showing Subcategories
What would I need to do to get the subcategories to show for the category that the user is currently in?
For example, on the main page, the category menu would show: - Cat A - Cat B - Cat C - Cat D However, if you click on Cat A, or go to a product that is in Cat A, the menu would show: - Cat A --- Sub Cat 1 --- Sub Cat 2 --- Sub Cat 3 - Cat B - Cat C - Cat D Any help would be greatly appreciated. Thanks! |
So far.. I have..
Code:
{if $config.General.root_categories eq "Y"} ..but it's outputting the same subcategory. So for Cat A, instead of getting: - Cat A --- Sub Cat 1 --- Sub Cat 2 --- Sub Cat 3 - Cat B - Cat C - Cat D ...i get - Cat A --- Sub Cat 1 --- Sub Cat 1 --- Sub Cat 1 - Cat B - Cat C - Cat D |
I would like to display my menus this way also. Did you ever figure it out.
|
Try this:
Code:
{section name=cat_num loop=$categories} You didn't have the index in the inner loop set correctly (cat_num vs. subcat_num). I also added " " tags to make it display properly. Hope this helps! --Kurt |
thanks! it works like a charm. :) I didnt have the
in there because the code sniplet i posted was a stripped down version of what im using... i have my menu setup in tables. http://www.aheadgames.com/cart/customer/home.php Here's the /customer/categories.tpl I'm using if anyone wants to do anything similar.. you might have to change things a bit to work with your cart. :) Code:
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="250"> |
Nice mod that, moved to custom templates 8)
|
inVINCEible,
How did you get the sub-categories to stay after a person clicks them. Did you have to make any other modifications? The categories and sub-categories are displaying correctly but if you click a sub-Categorie only the main categories are showing. The Sub-Categories disappear. Code:
<TABLE border=0 cellPadding=2 cellSpacing=0 width=100%> |
This is extremely cool and almost exactly what I am in need of right now! But Brian has a really good question. Additionally, I'd like to figure out a way to have the first main category initially opened by default, showing its sub-categories when a person first goes to the site. That way it will be more obvious to less experienced users that all these menus open to reveal more.
|
:)
Hey inVINCEible, Ditto to the two above, fantastic mod.. must admit, the ahead games site looks awesome.. Got a question... same as Brian... How did you get the sub-categories to stay after a person clicks them. would love to know how you did it! Cheers man.. Aj |
http://www.below-0.net
is there any chance you can make it more like that? by this i mean, not open up a new page aswell as revieling the lst of subcats |
All times are GMT -8. The time now is 04:45 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.