Filter order in list view

verzevoul

Member
Trying to reorder filters in list view.
I have many of them, like color , town , ...
I m strungling to change the order of them
Any suggestion please?
 
In your custom list template find file default_headings.php
Before
PHP:
foreach ($this->headings as $key => $heading)
place and modify this code with your custom ordered elements.
PHP:
$this->headings = array_replace(
array_flip(
    array('table_name___el_name1','table_name___el_name2','table_name___el_name3')
), $this->headings);
Attention: need to place all your column names.
This is for list template.
I'm not sure that filters will be reordered.

If not you can do similar in override filter file in your template
path: /templates/your_template/html/layouts/com_fabrik/list/fabrik-filters-bootstrap.php
before
PHP:
foreach ($d->filters as $key => $filter)
 
Last edited:
The filter order is your element order which determines also the element odering in in form and the column order in the list view.

The column order in list view can be overridden in the list menu setting "Show in list".

If you need a different ordering for your filters and in your form you can do it with a custom template as @startpoint says.
 
i have never tried to make different ordering through list menu setting "Show in list".
@troester thank's for your suggestion.
In some cases, it may be a better and faster solution instead of a custom template.
Although I almost always use a custom template(list,form, details).
There is always something for which I have not found a solution and I do it through code, be it PHP or JS, depending on the situation.
 
Hello!
I cannot make the order correct in my filters. It always change the order whatever I do. 2 elements are in the same group ordering 1 and 2 .
If you look at source You ll see that element 1 is ok first , and element to is the 6th on the row.
I tried to change all elements through phpmyadmin and make the ordering column 30 and more to all of them except the 2 I mentioned which I left them to 1 and 2.
Again the ordering goes to 1 and the other to 5.
Can you please help ?
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top