[ic] "Sort by" in the results page

Jim Sustacek interchange-users@interchange.redhat.com
Wed Jan 30 17:58:01 2002


Here's what I have for column header links on my Results page to sort search results:

by [search region]:
[if cgi ui_sort_field]
		[sort products:category:f products:db:f products:[cgi ui_sort_field]:f
	[else]
		[sort products:category:f products:db:f]
	[/else]
[/if]

and in the column header definitions:
[page href=@@MV_PAGE@@ form=`
	return "ui_sort_field=description\n" . sortrev('description');
	`]Description</A>

I'm already sorting the search by the category & db fields, and if they click on the "Description" header I'd like for it to sort by that also.  Unfortunately, this just puts a bunch of [sort products:category:f products:db:f] things on my Results page, and the Description header link just gives an Error - no search specified.  Can I use these cgi things to set sorts?  If so, what am i doing wrong?  If not, then how?

Thanks--
Jim Sustacek