Gossamer Forum
Quote Reply
Order of Search Results
Ive searched and read many hundreds of different posts. Some are just dead ends, some are too old to work I think.

So Im asking again:

How can I sort the order of the search results?

All my links have an attribute lets say called 1 2 3 4 5 6.
When searched, they all get alphabeticly and attributes in any order.
I need to make it where my first results are 3 then 5 then 1 and then the rest.
Categories are not an issue since all links in a category have the same attribute.

Something like:

<%if attirbte = 3%>
3 3 3 3 3 3
<%elseif attribute = 5%>
5 5 5 5 5 5
<%elseif attribute =1%>
1 1 1 1 1 1
<%elseif%>
2 4 6 2 mixed or not, doesnt matter.
<%endif%>

Thanks Andy

Last edited by:

Gorospe: Nov 9, 2011, 1:07 PM
Quote Reply
Re: [Gorospe] Order of Search Results In reply to
Hi,

Are you saying 1 2 3 4 5 are fields (for example) ? If so, have you tried tweaking the "build_sort_order_search" field in Setup > Search Options.

Something like:

Field1 ASC, Field2 ASC, Field3 ASC, score, etc

Hope that helps

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Order of Search Results In reply to
Sometimes we try too hard to look for ways to do things... Just to have someone hit us on the head and makes us see its been right in front of us all along.

Sorry for wasting your time Andy, but its much apreciated.
Worked just fine.

JC
Quote Reply
Re: [Gorospe] Order of Search Results In reply to
hahaha no worries - I do that all the time. Sometimes it does just take a fresh perspective to see the options in front of you Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!