News:

Looking for documentation? Take a look on our wiki

Main Menu

Can menu show only child categories while on the parent category page?

Started by nflmerch, September 21, 2011, 22:42:41 PM

Previous topic - Next topic

nflmerch

I have a ton of parent categories and a ton of child categories for each parent.  I see that there is a way to show the child categories in the VM Category menu module, but then it still shows all the parent categories.  This makes my side menu way too long.  Is there a way to show ONLY the child categories in the menu of the current parent category?

I'm sure it would be pretty easy to use an IF statement in the code to achieve this, but I wanted to make sure I wasn't missing a new VM2 setting before I did a core hack.
Thank you!

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

nflmerch

Thanks for the response, but that doesn't seem to work.  When I unpublish the parent category (and leave the child categories published), the child categories don't show up in VM Category menu either then. 
Here is an example of what I'd like to do:   http://www.fansedge.com/Green-Bay-Packers-Merchandise-_-400633638_BW.html
The customer selects a team from the top menu and then the child categories (they call it departments) for that team show up in the menu on the left side.
This seems to be a very popular way to navigate on sites with alot of products and parent categories.
Thanks again

jjk

That appears to be more a Joomla menu configuration question. In J1.7 I did set up an accordeon type menu where VirtueMart2 child categories show up only when you click on a parent category. But I didn't try to hide the main categories similar to your example website yet.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

PRO

nflmerch , this can be done a lot easier with joomla modules.

OR, the team can be set as the top level. THEN. Format the child category layout a different way with some css. (this would be the most automated way)

nflmerch

I'm not sure this is the best way to do it, but I achieved my desired results by making multiple VM-Category modules, one for each parent category. 

1) New VM-Category module
2) under Basic Options, set the 'Parent Category id' to a parent category
3) under Menu Assignment, check the box that matches that parent category, and select "Only on the Pages Selected" in the dropdown.
4) 'Save' and 'Save and Copy' and repeat steps for each parent category

Now the child categories are the only thing that shows up in the category module when on each parent category page.  :o