Page 1 of 1

Display 2 different menu modules for specific categories?

Posted: 25 Mar 2009, 21:39
by orangesparkz
I have top menu with 2 links (Backdrops and Rental Art) that are both Phoca Gallery Category List Layout. Each displays specific categories to the link using the hidden categories feature.
I have a side menu for each of these links (Backdrops and Rental Art) displaying specific categories to each using the hidden categories feature. I did this by coping the Menu Module, so I have 2 modules menus, one for assigned to each link.
Site, clicked on Backdrops link in top menu:
http://www.oliphantstudio.com/main/inde ... s&Itemid=5

Each of the two top menu links (Backdrops and Rental Art) display the correct side menu module. This works great, except it does not apply to the category pages. All the category pages for each link default to the first menu module. I think, because it is not set up to recognize category id#?

I need to be able to assign the menu module for a link (Backdrops and Rental Art) and to ALL their categories, so it will display the correct menu. If I could have it somehow recognize the Itemid, then it could differentiate between which of the two menus to display.
For example &Itemid=31 is always Rental art, so if it could recognize specific Itemid# then it would work. (I think)
Backdrops page = &view=categories&Itemid=5
Rental Art page = &view=categories&Itemid=31
Rental art category pages e.g.
&view=category&id=51:realistic&Itemid=31
&view=category&id=47:abstract&Itemid=31

Maybe this could be added or I could hardcode it into the php for now. ? Or maybe there is a better idea on how this can work?

Things I tried:
If I change the menu item to phoca gallery category list layout, but it can only show 1 category (I need it to show multiple) and the side menu is still wrong, defaults to 1st menu.

I think this issue is very similar to Modules dissapears problem! thread, but enough different that I do not understand how to fix my issue.
viewtopic.php?f=9&t=3479&p=17093&hilit= ... ies#p17093

Any help is great! :twisted: You guys are great.
-Cathy

Re: Display 2 different menu modules for specific categories?

Posted: 27 Mar 2009, 20:55
by orangesparkz
Help!
Maybe I'm doing this wrong and there is another way to display 2 different menus modules? Did I explain what I am trying to do clearly?

Top item(A) links to category view list(A) with side menu(A) and Top item(B) links to category view list(B) with side menu(B). The top links and side menus use the hidden feature in parameters to divide the categories between the 2 links.

Problem with side menu(B). Once category is clicked using the side menu(B), the side menu will defaults to side menu(A) instead of staying side menu(B).

There is definitely a way for it to work. Using category list as the "menu" and clicking the thumbnails images/icons to view category, the side menu stays(B). Only when using the menu module does it switch...
Any advice for things to try? This is very important! It's rather confusing for the menu to switch to a different menu when viewing the photos.
Thanks in advance!

Re: Display 2 different menu modules for specific categories?

Posted: 30 Mar 2009, 15:12
by Jan
Hi, I think this problem is related to Itemid in Joomla! as menu module and every module in Joomla! don't have any Itemid so they need to get some from some menu link and they both get the same so there is no other way than hard code the itemid into the modules :-(

Re: Display 2 different menu modules for specific categories?

Posted: 30 Mar 2009, 22:15
by orangesparkz
Okay. If I could hard code a Itemid in for each menu module, I'm not sure what file to hard code. When I copied the menu module (extenstions>>module manager) it did not create 2 separate mod_phocagallery_menu folders on the server. There is still just the one from installation. Do you know how it works when it's copied? I couldn't hard code 2 different modules with the different Itemids if I only have 1 file creating both menus? Do you know how that works?

Maybe this would be a solution?
If I could hard code a Itemid for each category, I think that would work. But I have no idea where to hard code that information. If there was a spot in the category details page to enter a Itemid, that would be perfect. I suppose this would be complicated to do?

Or I found this piece of code in the phocagallery_menu.php file, that may be helpful?

Code: Select all

//Unique id for more modules
$treeId = "PhocaGallery_".uniqid( "menu_" );
Is there any other ways to have 2 different side menus that work?
Thanks Jan (and anyone else with ideas to fix this)
-Cathy

Re: Display 2 different menu modules for specific categories?

Posted: 01 Apr 2009, 23:31
by Jan
Hi, if you want to have itemid for every category, then just create menu link to specific categories, so they all get Itemid (then you can hide the menu group, so it will be not displayed on the site, but all categories will have own itemid) ... but this doesn't solve going through the category tree, there the best solution is to have only one menu item and only one itemid, so the link is still the same :-(

Jan