The code above works (moreless), but becomes buggy once you start to visit subpages.
Is there a way to make the Ultimate Parent relative to the folder?
Also, is the code above “well written”, or should I switch the pdotools? The ultimate parent plugin hasn’t receive any updates from years, so it makes me worried.
It’s hard to say if these snippet tags are correct, without knowing the details of what you’re trying to achieve.
Maybe you can hard-code the &startId and don’t need the UltimateParent snippet.
You could replace Wayfinder with pdoMenu, but this shouldn’t change anything.
Also, there is usually no need to call Wayfinder uncached. [[Wayfinder? ...]] should be fine.
This extra is just one snippet with about 20 lines of code. So there’s not much to update.
Use your own “&tpl” and “&tplStart” chunks as needed.
Some of the Options with pdoMenu are different, often more meaningful:
The option “startId” is called “parents”.
The option “ignoreHidden” is called “showHidden”.
The Option “startItemTpl” is called “tplStart”.
(make sure you add &displayStart=1 if you need a tplStart… this at least is incoherent in your Wayfinder call)
The option “&removeNewLines=false” is not known by pdoMenu as far as I know. By default it doesn’t separate tags with newlines. You could however place newlines in the tpl-chunks if you need them.
Compare the output of Wayfinder and pdoMenu to find the right options.
By default always use the cache - it’s your friend. As halftrainedharry already said.
Skip the cache only if actually have a reason to do so.
One more thing: I personally prefer pdoMenu over Wayfinder, if for no other reasons because it’s at hand with pdoTools (which I like for several other reasons). But. Wayfinder should - still - do the job. Provided the tag is written right.
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.