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

    I've got a small question regarding the way output modifiers are written.
    I spent some time figuring out why this wont work:
    [[+placeholder:is=`1`:then=`<p>Hello</p>`]]


    When I removed the value-backticks it suddenly did!
    [[+placeholder:is=1:then=`<p>Hello</p>`]]


    Does the parsing of a page take value types in consideration or what causes this?

    - Kim
      • 1343 ☆ A M B ☆
      • 2,213 Posts
      Hello,

      The first call should work, the fact it's not could be a bug. Could you tell us what version of MODX you are using?
        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting
        • 3749
        • 24,544 Posts
        Some conditional modifiers need an ':else' clause to be parsed correctly. You might try that.
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 45821
          • 2 Posts
          Sorry for possible confusion!
          In some parts of our system we are using a custom loadchunk function and placeholder replacement, this seems to meddle with processing the modifiers.

          Still funny that some of them work while others don't, but the mistake was mine! smiley