17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1503 Views |
-
Can I set a Default Image for ImageField?

30 September 2008 at 1:52pm Last edited: 3 October 2008 4:48pm
No one has responded yet, so let me elaborate. I have an ArticlePage (radio show) that will have a Title, Image, Audio File, and Description. I have set the CMS up with a new ImageField, but for times that the client doesn't have a photo, I would like to set a default image. Any help would be appreciated.
Thank You,
Clint -
Re: Can I set a Default Image for ImageField?

3 October 2008 at 4:50pm
Is this possible? Is there a different approach that anyone can think of?
-
Re: Can I set a Default Image for ImageField?

3 October 2008 at 5:05pm Last edited: 3 October 2008 5:05pm
Square1,
the easiest way to do this would be to check if the image exists in the template, rather than inside the CMS (i dont think its supported). To do display a default image if one isnt provided, you can put this in your template:
<% if Image %>
$Image
<% else %>
<img src="assets/default-image.jpg" alt="Default Image"/>
<% end_if %> -
Re: Can I set a Default Image for ImageField?

3 October 2008 at 5:19pm
Just tried your suggestion, it worked!
thank you!
| 1503 Views | ||
|
Page:
1
|
Go to Top |


