Have a similar problem with
[[!UltimateParent:is=`1`:then=`i'm a child of 1`:else=`i'm NOT a child of 1`]]
wich gives the output (on a non-child of 1) -> notice the parentesis...
what is wrong there...I even stripped yout the params via ? &id=...
but it didn't help...any ideas what I'm doing wrong or is it just not possible to do conditional stuff with a snippet output?
EDIT: Just solved it in another way (which may not work in another scenario...) like most of the time possible in MODx =)...
Found the snippet for a custom outputmodifier :docfield
<?php
$options = strlen($options) ? $options : 'id';
$resource = $modx->getObject('modResource',$input);
return is_object($resource) ? $resource->get($options) : "";
and used it like this:
[[*parent:docfield=`parent`:is=`1`:then=`give me what I want`:else=`don't give me what I want`]]
[ed. note: exside last edited this post 11 years, 5 months ago.]