Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hi,

I am building a news section where the client has the option of adding an image - but they may not always want to.
Currently I have it set up like this:

<img src="<cms:show news_image />" />

But if the user doesn't upload an image to go with the story, it obviously shows a broken image link.
Is there a way to allow the system to detect if there is an image present or not?

Thanks
Andy
We can use the conditional statements (cms:if/cms:else) to help with this
Code: Select all
<cms:if news_image >
   <img src="<cms:show news_image />" />
</cms:if>

Hope this helps.
Simple!!! Thanks! :lol:
3 posts Page 1 of 1
cron