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,
    Is it possible to use and output filter with MIGX,

    I basically have 3 migx columns (img, alt, description) and i only want to render the description if it's populated. So i was trying to use an output filter.

    For example the tpl used to render each MIGX item is:
    [[+description:if=`[[+description]]`:eq=``:then=`<li><img src="[[+image]]" alt="[[+alt]]"></li>`:else=`<li><img src="[[+image]]" alt="[[+alt]]"><div class="flex-caption">[[+description]]</div></li>`]]


    But unfortunately this doesn't work, i've also tried using tv.description.

    If it's not possible then I could try the soution for multiple layouts here:
    http://rtfm.modx.com/display/ADDON/MIGX.Varying+layout-boxes

    But be nice for it to automatically see if they've filled in a description and if so display the description.

    Also the link to the discussion in the tut doesn't seem to work.

    Thanks

    Ben
      • 36926
      • 701 Posts
      Ok just thought i could use if snippet:
      http://rtfm.modx.com/display/ADDON/If

      And this works fine which is good.

      Ben