Testing SAEF - VIEWED


Multiple Members - VIEWED


This entry has been viewed 98 times.

Changing Search Results Order

Ok.. I almost got it…

Just add the input field you wish in th HTML between the {exp:search} tags… for instance:

{exp:search:advanced_form}

<input type="hidden" name="sort_order" value="asc/des" />
<
input type="hidden" name="orderby" value="nameofthefield" />
<
…rest of the form…>

{/exp:search:advanced_form} 

This way when the template is parsed this fields are included on the search form…

It sounds simple, but due to a mental lock-down from my brain I spent almost two days getting this to work ...duh!

Question for the pros:
Can I use this mechanism to sort by a custom weblog fields? what should iI use as the value? the “name” of the field or it’s database counterpart (field_id_n)?

Forum Thread

Posted by Mark Bowen on 11/13 at 09:37 PM

Name:

Email:

Location:

URL:

Smileys

Remember my personal information

Notify me of follow-up comments?

Next entry: Testing Something

Previous entry: My Curriculum Vitae

<< Back to main