Vox Populi(x) forum

Alexandria Book Library => Supporto (Support) => Topic started by: hymeno on 28 April 2019, 12:02:07

Title: changing searchtools-pull-down menu options
Post by: hymeno on 28 April 2019, 12:02:07
hi,

does anyone have any idea/hint how I can change the order of the pull-down menu options?
where are the relevant queries? In models or view.html I wasn't lucky yet ...

I want to change the year: latest on top
I would like to structure the tags according to their "groups" (like categories)

thx,
hym
protostar & com_abook&view=search-override

( hoping, that searchtools will be visible once under android too ...   :-\ )
Title: Re: changing searchtools-pull-down menu options
Post by: hymeno on 28 April 2019, 16:55:44
well: now you get the options more sorted:
.../components/com_abook/models/fields/
tags.php
line 56
Code: [Select]
$query->leftjoin('#__abtag_groups AS btg ON btg.id=t.id_taggroup');line 75
Code: [Select]
$query->order('btg.name DESC');
year.php
line 71:
Code: [Select]
$query->order('b.year DESC');:-(( Unfortunately as core-hack. I haven't found an override yet.


but there are still some list problems left:

abbook unfortunately still inserts page breaks for the hit list. But I would like to have everything on one page, i.e. "All" as default display number.

And I also can't access the sorting of the list via backend-options.
I can't find the competent location of the query ...
I would like to sort the titles according to the entries in "Catalog" and "# page index" ...

best
Title: Re: changing searchtools-pull-down menu options
Post by: hymeno on 03 May 2019, 13:58:24
via the backend options nothing desired of the searchtools could be changed.
After some long research I found an approach here
...components/com_abook/models/search.php, line 250:
Code: [Select]
// $query->order($db->escape($this->getState('list.ordering', 'a.ordering')).' '.$db->escape($this->getState('list.direction', 'ASC')).', a.title');
// commented out and for instance new:
$query->order($db->escape('a.year DESC'));
$query->order($db->escape('a.pag_index'));
This works, but is determined and of course not in the sense of J!

regards
Title: Re: changing searchtools-pull-down menu options
Post by: federica on 11 October 2019, 18:59:14
Hi hymeno,
which abook version are you using?