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

    I have a promotional box chunk, that contains tv’s for the client to edit.

    The ’promo’ chunk is called from the template. Please see chunk code below:
    <div class="promobox">
      <img src="[[*promoImage]]" width="345" height="205" class="imgright" alt="[[*promoImageAlt]]" />
    [[*promobox]]
          <div class="spacer"></div>


    How do I make it so that, if the tv’s are empty it does not display the chunk.

    Thanks
      • 26016
      • 561 Posts
      Based on your syntax, you’re using Revo, so I would suggest looking at these Output Filters for ideas, paying special attention to "notempty". The idea being to display your chunk if that TV is not empty.

      http://rtfm.modx.com/display/revolution20/Input+and+Output+Filters
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
        • 4882
        • 44 Posts
        Thanks samba tried [[*promobox:notempty=`[[$promo]]</div>`]]
        and it worked fine smiley