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

    I have just started using Modx today (coming from Wordpress) and I must say I am impressed with the flexibility that it offers! That said, I'm stuck on one part. I have a lightbox gallery working on the website, but I don't want it to spit out the code if the TV is empty and has no picture in it. I searched around on the web and found this.

    [[+phx:if=`[[*gallery2]]`:ne=``:then=`<a href="[[*gallery2]]" rel="lightbox[gallery]"><img src="[[*gallery2]]" alt=""/></a>`+]]


    gallery2 being the name of this particular TV. Currently it is blocking everything, even stuff with an image in it.

    Now I know phx isn't really a thing anymore in Rev, so what needs to be modified? I'd already added in the double square brackets as an adaptation from what I found on the web.

    Thanks for your help,
    Mattnham

    This question has been answered by Wanze. See the first response.

    • discuss.answer
      • 31946
      • 116 Posts
      [[*gallery2:notempty=`<a href="[[*gallery2]]" rel="lightbox[gallery]"><img src="[[*gallery2]]" alt=""/></a>`]]

      Check out the Output-Filter/Modifiers for Revo:
      http://rtfm.modx.com/display/revolution20/Input+and+Output+Filters+%28Output+Modifiers%29
        • 39882
        • 2 Posts
        Thanks so much! That worked a treat.

        I love this CMS laugh