-
☆ A M B ☆
- 2,475 Posts
Here’s a fun little brain tease:
Given only a single page_id, can you create 2 distinct menus (e.g. one for top-nav and one for left-nav)? The links in each menu are distinct with no overlaps. The first one is easy: you hide the pages you don’t want to display, then use your the page_id as the &startId parameter.
The second menu, however, is trickier. Is there some other Snippet that might be able to do more or less exactly what WayFinder does, except it could look for the value of a TV to determine if a page should be included in the 2nd menu?
This is trivial if you can specify different page_id’s for both menus, but for some long-winded reasons, only a SINGLE page_id can be used as the argument to generate both menus.
Heheh... it’s a good little mind tease. Anyone have any ideas?
Thanks!
Write an own snippet which creates a comma separated list of those page IDs which should be shown in the second menu. (The snippet has to loop through all the candidates and, depending on the value of the TV, add their IDs to the list or not.)
Then you set the snippet call into the parameter "&includes" of the Wayfinder call for the second menu.
-
☆ A M B ☆
- 2,475 Posts
I think the output filters approach might work... the other way wouldn’t because I can only reference the one page_id, that includes specifying other page ids to exclude/include. It’s a good Gedankenexperiment, nicht wahr?