Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Pages: [1]   Go Down
Print
Author Topic: search results order  (Read 320 times)
0 Members and 1 Guest are viewing this topic.
Lindau
New Member
*

Karma: 0
Offline Offline

Posts: 30


WWW
« on: March 07, 2005, 04:25:00 PM »

When I do a search, the results are out of order.

How can I get them sorted by event date?

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #1 on: March 07, 2005, 05:11:00 PM »

See the previous forum message: Event sort in Search View

Dan O.

------------------

Logged
Lindau
New Member
*

Karma: 0
Offline Offline

Posts: 30


WWW
« Reply #2 on: March 07, 2005, 08:59:00 PM »

DanO,

With one of the calendars, I have MetaCalendar running. Should I make the change on each template:

Find:

<% IF SEARCH RESULTS EXIST %>
No Matches
<% ELSE %>

Next line, put this code:

<% @$SEARCH_RESULTS = sort {$a->{schedule}->{start} <=> $b->{schedule}->{start} } @$SEARCH_RESULTS; %>

And that will sort it from earliest to latest. Swap $a and $b to sort from latest to earliest.

------------------

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #3 on: March 07, 2005, 09:53:00 PM »

** I have MetaCalendar running. Should I make the change on each template: **

If your calendars use different templates and you want the results sorted the same way on each... yes.

Dan O.

------------------

Logged
Pages: [1]   Go Up
Print
Jump to: