We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43288
    • 35 Posts
    Hi, I'm stumped on this one. I've got a resource whose [[*template]] is 10. That template includes a [[$footer]] chunk, and the following code in that chunk never produces any output:

    [[*template:is=`10`:then=`[[$another-chunk]]`]]


    However, I can see that the template resource tag is correct with this in the [[$footer]] chunk:

    <-- template is [[*template]] -->


    I've also tried:

    [[*template:isnot=`10`:then=`[[$another-chunk]]`]]


    and it also produces no output. Is there something special case about trying to do this this way? I could make a special footer_10 chunk or somesuch and be rid of the conditional logic, but I don't like hacking around mysteries like this. Thanks for any insight!
      • 35150 ☆ A M B ☆
      • 191 Posts
      Try specifying both conditional branches—then and else—even if else is just :else=``. It seems like you really shouldn't have to do that, but frequently it helps smiley
        Extras :: pThumb • Resizer • imageSlim • setPlaceholders
        • 43288
        • 35 Posts
        Quote from: jgrant at Apr 08, 2013, 04:42 PM
        Try specifying both conditional branches—then and else—even if else is just :else=``. It seems like you really shouldn't have to do that, but frequently it helps smiley

        Thank you very much for the suggestion, but neither the then= or the else= appeared....UNTIL I disabled caching of the output!

        [[!*template:is=`10`:then=`[[$another-chunk]]`]]
        


        That's not how I thought caching worked in MODX 2.2, but I'll take it! smiley

        Thanks again for your idea.