Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Instant Website: Realty/Listings/Auto:
Displaying Featured Property

 

 


thenetgirl
User

Jun 15, 2009, 8:49 PM

Post #1 of 4 (1430 views)
Shortcut
Displaying Featured Property Can't Post

I am trying to display only certain properties as a featured property

I made a separte check box to for DISPLAY with yes or no

<?php foreach ($listingsRecords as $record): ?>

<?php if ($record['front_page_display'] == "YES"): ?>
Price: $ <br>
<?php echo $record['front_page_display'] ?><br/>

<?php endif ?>



But as you can see here it still display both listings even when it says NO on the second one

http://www.canadaforsale.ca/index.php

can you help please


ross
Staff / Moderator


Jun 16, 2009, 1:20 PM

Post #2 of 4 (1426 views)
Shortcut
Re: [thenetgirl] Displaying Featured Property [In reply to] Can't Post

Hi there.

Thanks for posting!

Your code looks ok to me but keep in mind that it will be case sensitive. If the options you have for your checkbox are "yes" and "no" you will want to make sure the if blocks use "yes" or "no. Right now, your code is using "YES".

The other thing for now is that I don't actually see any listings at all on the page you linked me to. I see two when I do a search though.

One other thing I was thinking is you could actually just put a 'where' => "featured = 'Yes'" in your viewer code. That would get around having to use the if blocks on your page. The program would only give you featured listings.

Let me know what you think :).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Product Specialist
support@interactivetools.com

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/



thenetgirl
User

Jun 16, 2009, 1:40 PM

Post #3 of 4 (1424 views)
Shortcut
Re: [ross] Displaying Featured Property [In reply to] Can't Post

I have tried both my browsers (ie & Firefox)and and under the search module under the words Featured Listings are 2 listings should only be 1 I have attached a screen shot .let meknow if you dont see these on your browser.



and YES is the proper format.

The reason I went with Display is the featured thing didnt work either. I can get it to display both but not the chosen ones.
Attachments: canADAFL.jpg (156 KB)


thenetgirl
User

Jun 16, 2009, 4:08 PM

Post #4 of 4 (1422 views)
Shortcut
Re: [thenetgirl] Displaying Featured Property [In reply to] Can't Post

Tried the 'where' => "featured = 'Yes'",
that worked thanks Ross



Patricia