<![CDATA[ Wayfinder with Placeholders for dynamic menus - My Forums]]> https://forums.modx.com/thread/?thread=101977 <![CDATA[Wayfinder with Placeholders for dynamic menus]]> https://forums.modx.com/thread/101977/wayfinder-with-placeholders-for-dynamic-menus#dis-post-549789
My web site has a nice wayfinder menu. I've written snippets which uses more options in a menu structure.

I've used if to the following if snippet to switch between my standard web site menu to that from the snippet program.

[[if? &is=`[*ProgramMenu*]:eq:1` &then=`[+menu+]` &else=`[[Wayfinder? &startId=`0` &config=`Simple`]]` ]]


It uses a template variable on each page where I wish to replace the standard menu with that from the program. I've also coded into the snippet the same switch so I can control it from the program too (not that it is necessary).

What I'm trying to do is use Wayfinder and &ph to set a placeholder but also allow my program to set the same placeholder which I need to take precedence.

I guess it's all about the firing and replacement order of the core.

This what I've tried

[[Wayfinder? &startId=`0` &config=`valSimple` &ph=`menu`]]
[+menu+]


No matter what I always get the standard web site menu. My program menu never gets used when the placeholder is replaced.

I really would like to use this method rather than the if way. Would any one have any other suggestion or a workaround so the placeholders populated in order where the last population is the menu that comes through to the end webpage render?

Thanks in advance,

Chris]]>
BBloke Mar 30, 2017, 03:59 PM https://forums.modx.com/thread/101977/wayfinder-with-placeholders-for-dynamic-menus#dis-post-549789