Author Topic: Can menu show only child categories while on the parent category page?  (Read 3813 times)

nflmerch

  • Jr. Member
  • **
  • Posts: 114
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9942
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Can menu show only child categories while on the parent category page?
« Reply #1 on: September 22, 2011, 03:04:05 am »
just unpublish your parents
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

nflmerch

  • Jr. Member
  • **
  • Posts: 114
Re: Can menu show only child categories while on the parent category page?
« Reply #2 on: September 22, 2011, 21:56:43 pm »
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-SPAMMERS-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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3524
  • using Matomo instead of Google Analytics
Re: Can menu show only child categories while on the parent category page?
« Reply #3 on: September 22, 2011, 22:34:55 pm »
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

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10365
  • VirtueMart Version: 3+
Re: Can menu show only child categories while on the parent category page?
« Reply #4 on: September 22, 2011, 22:52:58 pm »
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)
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

nflmerch

  • Jr. Member
  • **
  • Posts: 114
Re: Can menu show only child categories while on the parent category page?
« Reply #5 on: November 08, 2011, 00:01:41 am »
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