(Solved) Page options: image (renders without image)

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
Oskar Rough
Forum Members
Forum Members
Posts: 40
Joined: Tue Aug 26, 2008 9:45 pm

(Solved) Page options: image (renders without image)

Post by Oskar Rough »

Hi,

I'm using 1.5.3. and wanted to try the image option that every page has. It works just fine, when I choose a picture but when I've got a page that shouldn't have a picture CMSMS adds the following line of code anyway:



In Firefox and Safari this isn't the biggest of problems, however, IE adds that annoying red-cross-icon. I guess it's a bug that should be fixed anyway :-)

Please, do ask if you have any questions.

Solved. Check third post.
Last edited by Oskar Rough on Tue Mar 10, 2009 11:30 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Page options: image (renders without image)

Post by Dr.CSS »

Works fine because you use it how?...

That kind of info works wonders in getting an answer to questions...

Like you could do an if there is an image show it if not don't do this etc. etc....
User avatar
Oskar Rough
Forum Members
Forum Members
Posts: 40
Joined: Tue Aug 26, 2008 9:45 pm

Re: Page options: image (renders without image)

Post by Oskar Rough »

Hey Mark! Thanks for the answer.

I managed to solve it using the following piece of code. If there's a better (more proper?) way of doing, let me know.

Code: Select all

{ assign var="fileToCheck" value=$content_obj->GetPropertyValue('image') } 
			
{ if $fileToCheck <> "-1" }			
	<img alt="" src="/uploads/images/{$content_obj->GetPropertyValue('image')}" />
{ /if }
Post Reply

Return to “CMSMS Core”