Displaying a Default Image

6 posts by 4 authors in: Forums > CMS Builder
Last Post: June 14, 2017   (RSS)

By Twocans - June 9, 2017

Hi yea,
I think this could be right,

<?php if(htmlencode($record['urlPath']) === NULL ) : ?>
your image here
<?php else: ?>
your dafault image here
<?php endif ?>

https://www.interactivetools.com/forum/forum-posts.php?postNum=2200421#post2200421

cheers

k

By Damon - June 13, 2017

Hi Mark,

Try adding this code outside of the image foreach loop:

<?php if (!$record['uploads']) : ?>
     Add code for default image here.
<?php endif ?>

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By Twocans - June 13, 2017

Wow sorry. Anyway, the cms is great.

K

By AlanAlonso - June 13, 2017

I will use this with my catalog project, I will use CMSB for a online store.

By mark99 - June 14, 2017

Thanks, I'll give these a try. Looks pretty simple :) .