I have an optional image property defined in Front end user. I need to check in my smarty templates whether this property has been set when displaying the user info, but haven't managed to do this successfully. I'll give an example. Assuming the smarty variable is called $photo I tried
Code: Select all
{if $photo==""}
<img src="{$gCms->config.uploads_url}/feusers/{$photo}" alt="no photo available"/>
{else}
<img src="{$gCms->config.uploads_url}/feusers/defaultuser.jpg" alt="no photo available"/>
{/if}
The problem is that even when no photo has been set the {if photo==""} returns true and the html source produced contains
Code: Select all
<img src="my_root_url/feusers/<noset>" alt="no photo available"/>
I would appreciate any ideas how to check this.
Thanks
Gillian