We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30912
    • 463 Posts
    I have a a requirement to either include or omit an image from a call, we will ahve a list of resources which will either have an image tv or they wont. if it doesnt have an image then we obviously dont want to show any img markup.

    I tried <img src="[[+Image:isequalto=`[[*Image]]`:then=`[[*Image]]`:else=`assets/images/blank.jpg`]] ]]" />

    but that didnt seem to work, has anyone any ideas?

    Thanks
      • 4172
      • 5,888 Posts
      try:
      <img src="[[+Image:isnot=``:then=`[[+Image]]`:else=`assets/images/blank.jpg`]]" />

      or
      <img src="[[+Image:default=`assets/images/blank.jpg`]]" />


      or put 'assets/images/blank.jpg' as default-value to your image-TV

      or if you don't want any img-tags:

      [[+Image:is=``:then=`<img src="[[+Image]]" />`:else=``]]


        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 30912
        • 463 Posts
        Thanks, i'll give that a try!
          • 30912
          • 463 Posts
          Thanks for the help, but it doesnt seem to work for me, maybe im missing something in my code who knows. Ill keep looking smiley