I guess you are overcomplicating things here, but you have a multitude of options to solve this problem:
1. Use some conditional on the [[+wrapper]] part in your template chunks for rowTpl, innerRowTpl, etc.
Something like this should do the trick:
&rowTpl
<li>
<a href="[[+wf.link]]">[[+wf.linktext]]</a>
[[[[+id:is=`5`:or:is=`8`:or:is=`9`:then=`+wf.wrapper`:else=`-`]]]]
</li>
Hint: You can chain conditional output filters (
http://rtfm.modx.com/revolution/2.x/making-sites-with-modx/customizing-content/input-and-output-filters-(output-modifiers))
2. I don't know how much chaining will slow down wayfinder, so it might be wise to go for a snippet instead:
<li>
<a href="[[+wf.link]]">[[+wf.linktext]]</a>
[[[[!inArray? &needle=`[[+id]]` &haystack=`5,8,9` &yes=`-` &no=`+wf.wrapper`]]]]
</li>
The inArray snippet could look like this
<?php
/* inArray snippet */
$needle = $modx->getOption('needle', $scriptProperties, false);
$haystack = $modx->getOption('haystack, $scriptProperties, false);
$yes = $modx->getOption('yes', $scriptProperties, '');
$no = $modx->getOption('no', $scriptProperties, '');
$delimiter = $modx->getOption('delimiter', $scriptProperties, ',');
if($needle && $haystack){
$haystack = explode($delimiter , $haystack);
if(in_array($needle,$haystack){
return $yes;
}
else {
return $no;
}
}
else {
return '';
}
3. Add a radio TV to each resource "displayChildren" and check if it is set to 1 (default) or 0.
<li>
<a href="[[+wf.link]]">[[+wf.linktext]]</a>
[[[[+displayChildren:is=`1`:then=`+wf.wrapper`:else=`-`]]]]
</li>
Attention: I'm not sure if Wayfinder will set placeholders for TVs, so this might be bad advice...
...
Cheers,
pepebe
[ed. note: pepebe last edited this post 9 years, 9 months ago.]