Default image on detail page
Thanks for posting.
Here's what I would do to have a default image if nothing was uploaded:
<?php if (!$record['image']): ?>
<img src="YOUR DEFAULT IMAGE PATH">
<?php endif ?>
Then, before that, you can put the code generator code for displaying images. If there is an image uploaded, that will trigger the code generator code you copied over. If there is no image uploaded, the code generator code will not run but this new block of code will.
Give that shot and let me know any questions or feedback.
Ross Fairbairn - Consulting
Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/
Thanks for the quick response, I cannot get it to work though, my code for the image is this:
<?php foreach ($latest_newsRecord['image_1_600_x_400'] as $index => $upload): ?>
<img src="<?php echo htmlencode($upload['urlPath']) ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="<?php echo htmlencode($upload['info1']) ?>" />
<?php endforeach ?>