Gossamer Forum
Home : Products : Links 2.0 : Customization :

Sort by rating and alphabetical

Quote Reply
Sort by rating and alphabetical
Well, after much looking, I got sort by rating (links 2.0) to work from help in the forum archives. However, a question that came up time and time again was how to sort by more than just one field... E.g., sort by "Top rated" then show the rest in alphabetical order. Links appears to have been written with the assumption that users would only ever want to sort by one field. In fact, the isNew and isPopular flags appear to be a workaround to creating a more complicated sort routine.

What is needed is to be able to do an alphabetical sort on all entries that have equal ratings. Anybody have any ideas on how to do this?

Also, thinking about this some, I thought it might be nice to create an index rating that is a formula of a number of different variables:

Popular/hits * (Rating/100) = ??? <-- That's just a sample, I'm sure a better formula could be created