Joomla Hide Menu Item, or: Using Rich Content as part of the navigation
Posted
by
chiccodoro
on Pro Webmasters
See other posts from Pro Webmasters
or by chiccodoro
Published on 2011-02-16T14:54:26Z
Indexed on
2011/02/16
15:33 UTC
Read the original article
Hit count: 305
In my Joomla based web site, I have a two layer main menu. The page layout contains two sections whereas the left one displays the content and the right one displays some other kind of content which at the same time serves as a menu.
For example, if the user clicks on the "Products" -> "SomeCategory" 2nd level menu item, the left section displays an image. The right section lists all products of that category. Each product is represented by an image and text. The content is scrollable. This section is implemented by means of a custom module (mod_custom) assigned to the menu. The content is rich text (HTML). Each product is entered manually by adding a picture and a text in the WYSIWYG editor, and by inserting a link for the picture and text.
Now the issue:
When the user clicks on a product, I want to display the corresponding product description article ("SomeProduct") to the left, accounting for the following requirements:
- The bread crumb now displays "Products -> SomeCategory -> SomeProduct"
- The main menu still displays the 2nd level for "Products", and "SomeCategory" is still marked as selected.
- (I would love if the right section which lists the product would remain in the exact same scroll state, but that's a completely different story.)
If I link the product entry from the right hand side directly to the article "SomeProduct", then the article appears to the left, but the breadcrumb and menu are reset.
So I wanted to create a hidden menu item "SomeProduct" beneath "SomeCategory", and to link the product entry to that menu item. This way, if I click on the product entry, the article appears to the left, the breadcrumb behaves correctly, and the menu state is preserved. However, it is not possible to configure the SomeProduct menu item as "hidden", therefore it appears in the main menu.
I found some resources that suggest to create another menu, called "hidden", which does not use any modules, and to create the "SomeProduct" menu item in that menu. Unfortunately this did not work for me: If I link that menu item from the product entry, and click on that entry, then the article appears to the left, but the menu is reset, and the breadcrumb displays "SomeProduct" instead of "Products > SomeCategory > SomeProduct".
Lucky me! I found an appropriate stackexchange site where I can pour out my heart to you guys. Sure you can help me :-)
© Pro Webmasters or respective owner