Some testing shows that the Parser seems to have problems handling the nestet snippet calls in the output modifier.
As a workaround you can use a snippet without parameters, let's say named
WFcall:
<?php
$startid = $modx->runSnippet('UltimateParent',array(
'topLevel' => '4'
));
$output = $modx->runSnippet('Wayfinder',array(
'startId' => $startid,
'level' => '1'
));
return $output;
This snippets creates the same output like the Wayfinder call I gave above, using the API function
modX.runSnippet.
(If you prefer the reference to the parent, you can use the function
modX.getParentIds.)
Using the snippet above, the code would just be
[[treedepth:isequalto=`3`:then=`[[WFcall]]`:else=``]]
Edit:
Corrected last line in snippet code:
return $output; (instead of echo $output; )
[ed. note: ottogal last edited this post 12 years ago.]