Hello,
I am using Zoom cgi, what would be the parameter in the URL in order to sort results by dates (ascending and descending) as I am using my own search form
Thanks
&zoom_sort=0
To sort by relevance
&zoom_sort=1
To sort by date. A date sort always places the newest pages first.
You actually don't need to include this in your form. The script will default to sort by relevance, and then the user can select sort by date if they wish.
----
David
Hello again
I tried to use zoom_sort=1 but it did not seem to work, although I have the zoom date files, I have purposefully not allowed my users to sort the results by date by unchecking that in the indexer,
could this be the problem
Thanks
Yes, if you turn off the sort by date feature, then it will not sort by date.
------
David
How to make it default to 'Sort by Date'? Thank you.
The easiest solution that I can think of at the moment is as follows.
You'll need to turn off the automatic generation of the Zoom HTML search form. Then create your own HTML search form that forces the &zoom_sort=1 parameter into the URL (maybe via a hidden field in the HTML form).
Let me now if you need more details.
--------
David
Please consider adding an option to specify the default sort either by date or by relevancy. This will eliminate having to manually create a HTML form. Thanks.
An alternative to creating your own search form would be to simply link to your search page with this extra parameter specified.
For example, elsewhere on your site, you must have a "Search" link that goes to your search page, say "http://www.mysite.com/search.php".
Change this link to be "http://www.mysite.com/search.php?zoom_sort=1"
and now your search page would be defaulted to "sort by date" whenever your visitors access your search page.
I second the notion to add an option to sort by date or relevancy. On my web sight the latest report from our laboratory is the most relevant 99% of the time.
The “?zoom_sort=1” apparently, does not work when the search URL is part of a script such as rollover, or when it part of the form HTML.
If you know of any work-around to this I would love seeing it.
Regards,
Chris
I can't see any reason why you won't be able to add the zoom_sort parameter to a rollover script, or a HTML form.
For the rollover script, you must specify the file that it is linking to in some way. So where you previously referred to "search.php", it should now be "search.php?zoom_sort=1". If there are other parameters that you need to send, it would be "search.php?myparam=blah&zoom_sort=1", etc.
For a HTML form, you can specify a hidden input value like so:
<input type="hidden" name="zoom_sort" value="1">
Perhaps you can give us a URL to your website so we can see why this may not be possible.