Checked list field displays an image - how to?
13 posts by 2 authors in: Forums > CMS Builder
Last Post: May 14, 2012 (RSS)
By csdesign - May 14, 2012
Hi Jerry,
I'm not frustrated... I realize there can be a process to things :)
I made dummys for each:
http://www.dunhamrealestateservices.com/listingDetail1.php?Condo-for-Sale-in-Red-Lodge-MT-38
http://www.dunhamrealestateservices.com/listings1.php?property_type=Residential
The listingDetail page seems to be working perfect. The new banner is showing and it's only on the one property that it's supposed to be on.
It's the listings.php page that's showing both text and image on every single property even though that "condo for sale in red lodge, MT" is the only one marked "new".
Thanks a ton!! Files are attached.
I'm not frustrated... I realize there can be a process to things :)
I made dummys for each:
http://www.dunhamrealestateservices.com/listingDetail1.php?Condo-for-Sale-in-Red-Lodge-MT-38
http://www.dunhamrealestateservices.com/listings1.php?property_type=Residential
The listingDetail page seems to be working perfect. The new banner is showing and it's only on the one property that it's supposed to be on.
It's the listings.php page that's showing both text and image on every single property even though that "condo for sale in red lodge, MT" is the only one marked "new".
Thanks a ton!! Files are attached.
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:
Let me know.
Jerry Kornbluth
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
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
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!
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!