We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    Maybe it's just because it's nearly 3 AM, but I can't seem to figure out how to use output modifiers in a getImageList tpl. In a perfect world, this would be the perfect tpl:
    <li>
      <a href="[[+url]]">[[+title]]</a> [[+description]]
    </li>

    However, there often isn't a url supplied for an item. So how would I skip the whole a tag if the url or the title placeholder is empty?
      Studying MODX in the desert - http://sottwell.com
      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
      Join the Slack Community - http://modx.org
      • 22427
      • 793 Posts
      I think this would do it (not tested):
      <li>
        [[+url:isnot=``:then=`<a href="[[+url]]">[[+title]]</a>`]] [[+description]]
      </li>
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Thank you, that did it.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org