Checked list field displays an image - how to?

13 posts by 2 authors in: Forums > CMS Builder
Last Post: May 14, 2012   (RSS)

Re: [csdesign] Checked list field displays an image - how to?

By gkornbluth - May 14, 2012

Hi Tina,

I could be wrong, but try this instead around line 60 and see what happens:
<td align="right" valign="middle">

<?php if ($listing['banner_status'] == 'Sold') : ?><img src="http://www.dunhamrealestateservices.com/images/bnr-sold.jpg" width="312" height="25" /><?PHP endif ?>
<?php if ($listing['banner_status'] == 'Reduced') : ?><img src="http://www.dunhamrealestateservices.com/images/bnr-reduced.jpg" width="312" height="25" /><?PHP endif ?>
<?php if ($listing['banner_status'] == 'New') : ?><img src="http://www.dunhamrealestateservices.com/images/bnr-new-listing.jpg" width="312" height="25" /><?PHP endif ?>
<?php echo $listing['banner_status'] ?>

</td>


Let me know.

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By csdesign - May 14, 2012 - edited: May 14, 2012

Thanks Jerry! Looks like we were just circling the wagons! It's working now.

I had to remove the last line to get rid of the text repeat of the word "new". Working great with this code below. I also tested another property, marking it "reduced" and that came up on the list page too, just like it was supposed to. :)

Thanks SO much for your help!! Tina


<?php if ($listing['banner_status'] == 'Sold') : ?><img src="http://www.dunhamrealestateservices.com/images/bnr-sold.jpg" width="312" height="25" /><?PHP endif ?>
<?php if ($listing['banner_status'] == 'Reduced') : ?><img src="http://www.dunhamrealestateservices.com/images/bnr-reduced.jpg" width="312" height="25" /><?PHP endif ?>
<?php if ($listing['banner_status'] == 'New') : ?><img src="http://www.dunhamrealestateservices.com/images/bnr-new-listing.jpg" width="312" height="25" /><?PHP endif ?>


Removing all the status banners now because that property wasn't actually "new" so they won't be showing at all on the site - but they work! thanks again!