[SOLVED] Display content img if exists, else display default
Posted: Fri Jul 13, 2012 9:12 pm
In my template, I want to display the Content Image if one is specified. If none is specified, I want to display a default image.
I'm inputting the content image here:

This is my code (rough draft). The RED section is the line that I'm stuck on!
I tried following these instructions, but they are from 2009 and do not work.
I'm inputting the content image here:

This is my code (rough draft). The RED section is the line that I'm stuck on!
Code: Select all
[color=#FF0000]{if content image exists}[/color]
<img src="/uploads/images/{$content_obj->GetPropertyValue('image')}" alt="" width="261">
{else}
<img src="/uploads/images/i-side.jpg" alt="" width="261" height="175">
{/if}