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

    I used to use Phx in evo to render some heading. For example if longtitle was empty it won’t render some empty h1 tags.

    Is there a way in revo to do this using the filters or is the ’if’ snippet the way to go?

    Thanks

    Ben
      • 27347
      • 65 Posts
      Hi there are a couple of useful outputfilters in Revo, amongst them the notempty filter. It works something like this:

      [[*longtitle:notempty=`<h1>[[*longtitle]]</h1>`]]

      http://rtfm.modx.com/display/revolution20/Input+and+Output+Filters

      And i think you can also use some phx syntax inside Revo but of that i’m not sure.
        • 36926
        • 701 Posts
        Quote from: SiNNuT at Aug 17, 2010, 07:28 AM

        Hi there are a couple of useful outputfilters in Revo, amongst them the notempty filter. It works something like this:

        [[*longtitle:notempty=`<h1>[[*longtitle]]</h1>`]]

        http://rtfm.modx.com/display/revolution20/Input+and+Output+Filters

        And i think you can also use some phx syntax inside Revo but of that i’m not sure.

        Thanks SiNNut that’s exactly what i’m looking for. I must of missed this one when reading the docs.

        Ben
          • 27347
          • 65 Posts
          Well maybe you didn’t miss it because it has been undocumented for a while. I discovered the notempty filter via the ’create a blog tutorial’
          But it’s good that it’s in tfm now smiley
            • 36926
            • 701 Posts
            Quote from: SiNNuT at Aug 17, 2010, 02:11 PM

            Well maybe you didn’t miss it because it has been undocumented for a while. I discovered the notempty filter via the ’create a blog tutorial’
            But it’s good that it’s in tfm now smiley

            Ahh that could explain it as was sure i looked out for that when reading that page.