Hi all,
I’m using GetPropertyValue('image')}"/> in my template to display an image selected from the “Image” drop down in the edit page screen, this feature works great when you select an image to display, but I have found that in explorer when an image is not selected I get a red X or missing image icon.
Is there a way to hide if no image value is found?
Using: CMS Made Simple 1.6.7 "Teremba Bay"
Edit Page > options > Image Drop Down
Re: Edit Page > options > Image Drop Down
Code: Select all
{if isset($content_obj->GetPropertyValue('image')) and $content_obj->GetPropertyValue('image') != ''}
here comes your img-tag
{/if}
Re: Edit Page > options > Image Drop Down
Hi owr_bgld,
I get the following error when I placed you code in my template
I get the following error when I placed you code in my template
Fatal error: Can't use method return value in write context in /***/***/public_html/beta/tmp/templates_c/%%E1^E1E^E1E3E438%%tpl_body%3A29.php on line 39
Re: Edit Page > options > Image Drop Down
you can try to change from != '' to != "" (the doubles instead of the single ones) or try only
Code: Select all
{if isset($content_obj->GetPropertyValue('image'))}