Revo 2.1.3
Wayfinder 2.3.1
PHP Version 5.2.10
How do I go about doing something like this?
I have a site with a main navigation along the top right (showing on every page), which contains some top-level pages.
I also have a secondary menu system along the left column (also showing on every page) which has some second-tier pages. Each of these second-tier pages has sub-pages under them.
What I am trying to accomplish is to make each of the left-column menu items expand or contract, revealing the underlying left-column submenu items, as you click on the left column menu items. These items then hide when you click on another left menu item, revealing the submenu items under that. I don’t mean any kind of jquery accordian effect, where the thing expands on hover or anything. The submenu items reveal only as long as you are within a page within the particular container. Keep reading and maybe I’ll make more sense...
I have had some success with this by following the tutorial on the Wayfinder PDF Usermanual, which you can download here:
http://modxcms.com/forums/index.php?action=dlattach;topic=34176.0;attach=9315
Basically, I did the following:
1. Created each of the left column menu items as containers, which contain each of their submenu items.
2. Each of these containers are, in turn, contained within an overall left-column container, which I have called ’Left_Column_Main_Menu_Container’. Actually, this long-named container will not be seen online...I just wanted it to serve as a container and to provide an ID number (you’ll see why in the next step). The ID number for this container is 11, by the way.
3. The left column wayfinder call looks like this:
[[Wayfinder? &startId=`11` &outerTpl=`menuContainer` &level=`2` &hideSubMenus=`TRUE`]]
I don’t think it matters with my issue, but the ’menuContainer’ template contains this:
<ul[[+wf.classes]]>[[+wf.wrapper]]</ul>
4. All of this works great to a certain extent. The menu on the left reveals the submenu items of the menu item you click on and hides the other ones with no problem...as long as you are viewing one of the pages linked from the left hand menu. As soon as you go to a page that is not linked to from the left menu system (such as one of the top level menu items along the top of the page), the whole left menu gets hidden.
Yes, I know it has to do with the &hideSubMenus=`TRUE` thing, which is faithfully hiding the menu items in the containers that make up the left column items.
So...
If my system above is not how one goes about creating the effect I want, how would you accomplish it? Am I close to accomplishing what I want with the system I outlined? What am I missing?
Please note:
1. Each main item on the left menu has to show on all the pages of the site.
2. Each submenu item under each left menu item must be hidded until the main left menu item is selected.
3. Each submenu item that was revealed must hide when another left menu item is selected and the ones under the next selected ones revealed.
You get the picture.
Any help is appreciated.