 |

mainebound
User
Jul 10, 2007, 10:28 AM
Post #1 of 8
(2230 views)
Shortcut
|
|
Sort search results
|
Can't Post
|
|
I have a variety of search result pages for my realty site resulting from a link like this: http://yoursite.com/path/to/search.cgi?search=1&lfieldX_keyword=Waterfront%20Home The problem is that we want to have these results sorted by property price - least expensive to most expensive. How can I accomplish this?
|
|
|  |
 |

Donna
Staff
/ Moderator

Jul 11, 2007, 11:47 AM
Post #2 of 8
(2218 views)
Shortcut
|
|
Re: [mainebound] Sort search results
[In reply to]
|
Can't Post
|
|
Hi there, At the end of your query, add something like this: &sort_order=5,123,forward ...where "5" is the field you want to sort on, "123" means "numerical" (change to "abc" to sort alphabetically) and "forward" is the direction you want it to go (change to "reverse" to switch the order.) So the full query would be something like this: http://yoursite.com/path/to/search.cgi?search=1&lfieldX_keyword=Waterfront%20Home &sort_order=5,123,forward I hope this helps! Let me know if you're having any trouble with that. :) Donna
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.
|
|
|  |
 |

john@pascoe.net
User
Aug 31, 2007, 10:25 PM
Post #3 of 8
(1907 views)
Shortcut
|
|
Re: [Donna] Sort search results
[In reply to]
|
Can't Post
|
|
Donna Here is the query and is working fine. I have a new task. The keyword=Sold can it pickup Sold and Leased I was reading about unable to do two searches does it apply to this query? I tried Sold+Leased thanks JJ cgi-bin/listman/exec/search.cgi?search=1&perpage=15&sort_order=5,abc,forward&lfield34_keyword=Sold&template=_search_results_recent_sales.html
|
|
|  |
 |

MikeB
Staff
/ Moderator

Sep 1, 2007, 10:14 AM
Post #4 of 8
(1871 views)
Shortcut
|
|
Re: [john@pascoe.net] Sort search results
[In reply to]
|
Can't Post
|
|
Hi John, Thanks for the email! :) Searching for multiple keywords in one field isn't something that Listings Manager's search engine is set up for. If you search for "Sold+Leased" then the search will look for any listings that have "Sold Leased" set for this field and you'll end up with no results. If you'd like to separate unavailable listings (sold, leased, etc.) from available listings I'd suggest creating a new field where you can choose if a property is available or unavailable. This way rather than searching on Sold/Leased you can just search on the Available/Unavailable field. I hope this helps John! Cheers, Mike Briggs - 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.
|
|
|  |
 |

john@pascoe.net
User
Sep 1, 2007, 12:12 PM
Post #5 of 8
(1865 views)
Shortcut
|
|
Re: [MikeB] Sort search results
[In reply to]
|
Can't Post
|
|
How about if I use a common keyword letter like "d". Then the template will put differant background images fo the sale or lease. OR do I need a differant field altogether? Thanks JJ <script type="text/javascript"> if ('$lfield34$' == 'Sold') { document.write('<td><img src="/images/background_soldsign.gif" style="background-repeat: no-repeat;" bgcolor="#FFFFFF"></td>'); } else if ('$lfield34$' == 'Leased') { document.write('<td><img src="/images/background_leasedsign.gif" style="background-repeat: no-repeat;" bgcolor="#FFFFFF"></td>'); } </script>
|
|
|  |
 |

MikeB
Staff
/ Moderator

Sep 1, 2007, 2:46 PM
Post #6 of 8
(1856 views)
Shortcut
|
|
Re: [john@pascoe.net] Sort search results
[In reply to]
|
Can't Post
|
|
John, Thanks for the reply! Using a common letter rather than setting up a new field should work fine as long as this letter won't show up in any of the other options in this dropdown menu. If this letter does show up somewhere else in the options/values for this field you could get around this by adding a full word after Sold and Leased in the admin program in the "Status" field ($lfield34$ in this case). From there you could then search on this word you appended rather than just a single letter. Also, this JavaScript you've set up for the background images looks great and that should work for your search results page. I hope this helps John! Cheers, Mike Briggs - 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.
(This post was edited by MikeB on Sep 1, 2007, 2:47 PM)
|
|
|  |
 |

john@pascoe.net
User
Sep 3, 2007, 7:05 PM
Post #7 of 8
(1834 views)
Shortcut
|
|
Re: [MikeB] Sort search results
[In reply to]
|
Can't Post
|
|
I am using the keyword with just a letter (d), but the script below only catches the Sold one not the Leased one any ideas thanks JJ <script type="text/javascript"> if ('$lfield34$' == 'Sold') { document.write('<td><img src="/images/background_soldsign.gif" style="background-repeat: no-repeat;" bgcolor="#FFFFFF"></td>'); } else if ('$lfield34$' == 'Leased') { document.write('<td><img src="/images/background_leasedsign.gif" style="background-repeat: no-repeat;" bgcolor="#FFFFFF"></td>'); } </script>
|
|
|  |
 |

MikeB
Staff
/ Moderator

Sep 4, 2007, 10:57 AM
Post #8 of 8
(1779 views)
Shortcut
|
|
Re: [john@pascoe.net] Sort search results
[In reply to]
|
Can't Post
|
|
Hi John, Thanks for the post! I've taken a look at this for you and I'm just a bit curious about this. Are the Leased properties not coming up at all in the search results or are they just not getting their own image showing up? If you can give me a bit more detail about this and potentially a link to your site I should be able to have another look into this for you. I look forward to hearing from you John! Cheers, Mike Briggs - 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.
|
|
|  |
|