ModX if statement in a parameter -




i new modx revolution, , can't figure out. need show pages parent url (e.g. clinic=21) , if no clinic set set parents list. i've got this:

[[!getpage?      &elementclass=`modsnippet`      &element=`getresources`      &parents=[[!if? `[[!searchfieldclinic? &field=`clinic`]]`=`` &then=`127,106` &else=`[[!searchfieldclinic? &field=`clinic`]]`]]     ]] 

but if returns 127,106,70,76,83,93,92,99,113,120,134,148,155,162,169,176,704,975,183

what doing wrong? in advance

figured out myself, :)

[[!getpage?      &elementclass=`modsnippet`      &element=`getresources`      &parents=[[!if?        &subject=`[[!searchfieldclinic? &field=`clinic`]]`        &operator=`eq`        &operand=``        &then=`127,106,70,76,83,93,92,99,113,120,134,148,155,162,169,176,704,975,183`        &else=`[[!searchfieldclinic? &field=`clinic`]]`     ]] ]] 




wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -