We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40249
    • 31 Posts
    i'd like to show content when one of several TVs is empty.

    I've tried the following code but it doesn't work
    [[*data1:!empty:and:*data2:!empty:and:*data3:!empty:then=`my content`]]

    checking one TV works without a problem like this
    [[*data1:!empty:then=`my content`]]

    what i'm doing wrong?

    [ed. note: degoya last edited this post 10 years, 7 months ago.]
      • 30912
      • 463 Posts
      Hiya,

      try this snippet:

      http://forums.modx.com/thread/32601/andif---conditional-snippet-allowing-multiple-and-or-conditions

      your syntax would be smoething like

      [[AndIf? &condition=`[[*data1]] isempty 1|[[*data2]] isempty 1|[[*data2]] isempty 1` &operator=`AND` &then=`DO THIS` &else=`Do That`]]


      not tested abviously, but its a very helpful snippet.

      you might need th operator to be OR if tou want to check on individual TV's
        • 40249
        • 31 Posts
        i gonna check the AndIf snipped.

        acutally i used the "if" snipped with this code

        [[If?
        &subject=`[[*data1]][[*data2]][[*data3]]`
        &operator=`empty`
        &then=`<h4>subhead</h4>`
        ]]