
ross
Staff
/ Moderator

Oct 2, 2006, 8:59 AM
Post #2 of 6
(4192 views)
Shortcut
|
|
Re: [CarlitosWay] Search results order
[In reply to]
|
Can't Post
|
|
Hi there. Thanks for posting! There is actually a way to change the sort order on your search results. There are two ways to do it depending on how your search results are coming up. If you are going from a search form to the results, just add the following element to your form: <input type=”hidden” name=”sort_order” value=”7,123,forward”> If you are using a link to the search results, just add in “&sort_order=7,123,forward” a the end of the URL like this: <a href=/cgi-bin/listman/exec/search.cgi?search=1&sort_order=7,123,forward> Now, there are a couple things to change or adjust. Here’s a breakdown of what each piece in the sort_order means: 7 => this is the listing field that the sort is based on. In your specific example (sorting by date) you’ll actually be using a special field -11, but it is usually a number between 1 and 75. 123 => this tells you what kind of sort will happen. 123 is numerical and abc is for alphabetical. In your example, you can leave this as 123. forward => this says to sort from low to high. That other option is reverse which is high to low. You’ll actually want to use reverse. And that should be it. Give this a shot and let me know how you make out . ----------------------------------------------------------- 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/
|