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

    I want to output following result if the chunk is present. How do I do it?
    <div>
    <div id="[+phx:if=`chunk-PageImages`:is=`present`:then=`iscontent`:else=`isnotcontent`+]">
      [*#content*]
    </div>
    {{PageImages}}
    </div>

      • 1343 ☆ A M B ☆
      • 2,213 Posts
      The question you should be "asking" with phx is ifempty or notempty, you can't ask if a chunk is present, but you can check against something else.

      You could for example do: [+phx:if=`[*imagetv*]`:notempty=`iscontent`:else=`isnotcontent`+]


        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting