Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Different sort orders for different categories?

Quote Reply
Different sort orders for different categories?
Is it possible to have a basic sort order for all Categories and links, except for certain categories, the links are sorted on a different sort order?
Quote Reply
Re: [Evoir] Different sort orders for different categories? In reply to
Maybe a plugin or a global could address this? Is it even possible to do?
Quote Reply
Re: [Evoir] Different sort orders for different categories? In reply to
Hi,

You can try the following:

In a category view add this to the end of the url:
&sb=Title&so=ASC for example...

so you would have something like:
page.cgi?g=1974&d=1&sb=Title&so=ASC

Where sb is the field you want to sort by and so is the sort order.

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] Different sort orders for different categories? In reply to
Ah. I meant to say in static mode... Shocked
Quote Reply
Re: [Evoir] Different sort orders for different categories? In reply to
Hi,

Don't have much experience with static mode - but perhaps you could do something like this in your category template (not sure it works though...):

Code:
<%if ID eq '2002'%>
<%set sb = 'Title'%>
<%set so = 'ASC'%>
<%links%>
<%else%>
<%links%>
<%endif%>

You might need to use a global that sort the results for you...

Klaus

http://www.ameinfo.com

Last edited by:

klauslovgreen: Mar 3, 2003, 1:06 PM
Quote Reply
Re: [Evoir] Different sort orders for different categories? In reply to
Hi,

You couldn't do this with a global as the links are already sorted and returned by the time the template is parsed (and you can't resort them as you only have one page of results available).

This would need to be done as a plugin.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Different sort orders for different categories? In reply to
Hi,

Has anyone written this plugin? Can't find it via search.

Thanks, Alba