We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36723
    • 94 Posts
    Hello,

    I would like to know if with just a chunk I can use OR logic.

    Such as:


    [[*sidebarPhoto6:notempty:or:equalto=`x`:then=``:else=``]]

    If it can’t be done like this how would this work with a snippet. Can I pass the value to the snippet?

    Thanks
      • 33968
      • 863 Posts
      Yep you should be able to do that, give it a try! Note that’s a TV tag not a chunk by the way.

      And... if you want to pass a value to a snippet, you could do it like this:
      [[!mySnippet? &value=`[[*sidebarPhoto6]]`]]
      

      &value is the same as ’$value’ in your snippet.
        • 7455
        • 2,204 Posts
        Why would you use notempty and equalto?

        if it equalsto then its not empty anyway, so you could use only notempty

        Dimmy
          follow me on twitter: @dimmy01
          • 36723
          • 94 Posts
          @lucas Thanks for the answer, that works.

          @Dimmy I was not sure you could combine notempty and equalto. I will try that and let you know if I have any problems.