문제

I want to write only output if needed, but it returns nothing. No a and no b.

[[+mobilephone]] <- not empty
[[!If? &subject=`[[+mobilephone]]` &operator=`notempty` &then=`a` &else=`b`]]

maybe you have an idea. My Context is a Site which called a Snippet which call a Chunk.

Version Info:

MODX Revolution 2.2.10-pl (sdk)

도움이 되었습니까?

해결책

You could try with normal output modifiers:

[[+mobilephone:notempty=`a`:else=`b`]]

다른 팁

You seem to be missing the & from subject i.e. try

[[!If? &subject=`[[+mobilephone]]` &operator=`notempty` &then=`a` &else=`b`]]
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top