I have posted this on Etomite forum, but if anyone can help here it would be great, as the templates/snippets will be run on modX.
Here's a copy of my post>>
I have tried various different configurations to get the following to work with ListMenu snippet. What I am trying to achieve is a design with 3 different menu blocks (all using LI style menus), where the siblings of all parents are shown, but in different blocks, and the path to top level is shown by retaining an onMenu
state for all parent folders.
The easiest way to explain is to look at an example at http://www.createloyalty.com.au
* If you click on Rewards the Level 2 Menu appears
* If you click on Customer Rewards the Level 3 menus appear
[Note: This example does not trace the path back to root by retaining the onMenu status for parents. What I would like that is not in the example, is that when Customer Scheme A (Level 3) is active, both Customer Rewards, and Rewards retain onMenu
class or id]
Can anyone can configure or modify ListMenu (or help me) to achieve this? I will share with the community a generic template using this menu system if someone can help.
Detailed explanation below.
1. Block 1 - Level 1 menus
eg. Home, Create Txt, Rewards etc.
* If you click on a page there is an menuOn
class or id.
* If the children (Level 2), or grandchildren (Level 3) of a that item are active then the menuOn
class or id stays on.
2. Block 2 - Level 2 menus
- eg. If you click on Rewards in Level 1, you can see Customer Rewards, Trade Rewards etc in this block (Level 2)
* If there are no children to a Level 1 item then this block does not display. (click on Home to see)
* When you click on a Level 2 item (eg. Rewards>Trade Rewards) there is a menuOn
class or id, and the other Level 2 items remain on display.
* If the children (Level 3) of a that item are active then the menuOn
class or id stays on.
2. Block 3 - Level 3 menus
- eg. If you click on Customer Rewards in Level 2, you can see Cusoter Scheme A, Customer Scheme B etc in this block (Level 3)
* If there are no children to a Level 2 item then this block does not display. (click on Trade Rewards)
* When you click on a Level 3 item (eg. Rewards>Customer Rewards>Customer Scheme A) there is an menuOn
class or id, and the other Level 3 items remain on display.
* Don't anticipate any further children....but maybe this could be configured so that further children etc are displayed in a nested list (see comments in Note below). I anticipate Level 3 would be always be vertical.
"Its for modX" - not in my Etomite post
Note: In CMSimple you can set the template call (like a snippet parameter) with a very easy:
for Level 1, or
for a Level 2. You can also combine the blocks to show a nested list so that
shows Level2 and 3 in a nested list.