Edit Page > options > Image Drop Down

General project discussion. NOT for help questions.
Post Reply
fivepix
Forum Members
Forum Members
Posts: 14
Joined: Sun Jan 24, 2010 10:19 pm

Edit Page > options > Image Drop Down

Post by fivepix »

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"
owr_bgld

Re: Edit Page > options > Image Drop Down

Post by owr_bgld »

Code: Select all

{if isset($content_obj->GetPropertyValue('image')) and $content_obj->GetPropertyValue('image') != ''}
here comes your img-tag
{/if}
this should work
fivepix
Forum Members
Forum Members
Posts: 14
Joined: Sun Jan 24, 2010 10:19 pm

Re: Edit Page > options > Image Drop Down

Post by fivepix »

Hi owr_bgld,

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
owr_bgld

Re: Edit Page > options > Image Drop Down

Post by owr_bgld »

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'))}
Post Reply

Return to “General Discussion”