How is the default sort order set for images found by a tag search? E.g. galleries/page/search/tags/searchitem . I'd like images to be sorted by title, e.g.
This topic is very old from a time the search engine was in its early state.
As noted on the other topic: Search order is by relevance (you don't expect another order for results, do you?). If you wish another you need to do that in the loops on your theme directly.
The only "search" results you can sort via the backend are dynamic albums (=saved searches).
But whatever value i use for $sorttype it does not change the order. Same code is working flawless on my index/album.php.
Ideas? Is it a bug? There has to be a way to order the results. I'm using tags as a part of the navigation, so ordering by relevance does not make sense here.
Comments
I asked the same question in a different post and was given a different answer than the poster above.
My testing of approved themes does not show that searches can be sorted by the gallery order. Or by the custom options offered in gallery sort order.
I tried "filename,date" or "date,filename" as parameters for gallery sort, but it seemed to have no effect at all on the the search returned.
Actually....when I use custom sort "date,filename" I get a MySQL error when I initiate a search.
As noted on the other topic: Search order is by relevance (you don't expect another order for results, do you?). If you wish another you need to do that in the loops on your theme directly.
The only "search" results you can sort via the backend are dynamic albums (=saved searches).
i'm trying to sort my results in my search.php
$sorttype = 'title';
$sortdirection = "asc";
while (next_album(true, $sorttype, $sortdirection)):
...
But whatever value i use for $sorttype it does not change the order.
Same code is working flawless on my index/album.php.
Ideas? Is it a bug? There has to be a way to order the results. I'm using tags as a part of the navigation, so ordering by relevance does not make sense here.
finally i did a workaround by collecting and sorting the albums in an array.
So do i have to open a ticket or something for this bug??
Thanks for your reply!