how to arrange filters horizontally

enzo2016

Member
Hi,
I have read the wiki about the code to replace, in order to have the filters in horizontal.
The wiki writes to replace the code into the default_filter.php file. It seems that, at present time, either the bootstrap and the div template have not that file. How can the filters be arranged horizzontally? I am using the div template.

Thanks,
Enzo
 
1. You can set "Filter columns" in list settings/Filters

2. Yes, filter code is not longer in default_filter.php, it has moved to layouts.
Copy components\com_fabrik\layouts\list\fabrik-filters.php
to components\com_fabrik\views/list/tmpl/<your-list-template>/layouts\list\fabrik-filters.php
and modify

3. As a standard subscriber you should better post in the standard forum .
 
Thanks so much Troester.
1. When I use only the "Filter columns" in list settings/Filters, the column seems to be only one. When I set 1 column it is justify. When I set 2 or more columns, the element are not justified, but the column seems to be always 1.
2. I have created a folder (named layouts) into my template folder; inside "layouts" have created the "list" folder and inside this folder, have copied the fabrik-filters.php file. I have tried two attempts to modify it: 1) I have deleted all of its original content and added the code inside the wiki; 2) replaced only the content starting from <div class="fabrikFilterContainer">....The errors returned from frontend are different based on the start point where the code is pasted. Which is the correct point where to paste the code?
3. Ok. Thanks.

Enzo
 
Last edited:
Hi,
about point 1) of my previous post, the columns are arranged vertically. It is ok because the fabrik-filters.php is not changed.
How can I change the fabrik-filters.php in order to have horizontal columns?

When I read the wiki I understand to replace the whole code (written in the wiki for horizontal filters) to the fabrik-filters.php. My understanding is wrong because it doesn't work. Is the wiki updated?

Enzo
 
Which page / section in the wiki? I need to fix it, maybe remove it, because ...

As of these commits:

https://github.com/Fabrik/fabrik/commit/70692c787ffc6eaccbef660726935408e09dd06b
https://github.com/Fabrik/fabrik/commit/c965aaea2fd38702b75bf75c3c1e87a32787ffd7

... I've added a new fabrik-filters-bootstrap layout, which it uses if "Filter Columns" in the list's filter settings is > 1, which applies a fluid grid to the filters, chunked into the number of columns you specify.

I've tested it in ProtoStar (Bootstrap v2) and Helix 3 (Bootstrap v3, requires the alt template layout overrides), and it seems to work OK. Could probably do with a little styling, I'll tweak it once I'm sure the basics are sound.

Note that in >1 column mode, it will always do "labels above" (put the filter label above the value).

So ... just do a github update, set the number of filter cols you want, and let me know if it works OK.

-- hugh
 
Thanks so much Hugh. The link of the wiki about the horizontal filters is:
http://fabrikar.com/forums/index.php?wiki/display-list-filter-horizontally/

Yes, sure, I will test it with Gantry 5 and let you know. I am updating from Github. Please can you confirm that the following procedure is ok for my update on local server?
1) download the zip file from the link for Fabrik 3.2+
2) extract the files
3) delete the folder fabrik-build
4) select all of the files and folders extracted (without fabrik-build)
5) copy them into htdocs - websitename
6) replace everything
7) Post Github update steps

Please can you confirm that steps from 2) to 6) are correct?

Thanks,
Enzo
 
Thanks so much Hugh. The link of the wiki about the horizontal filters is:
http://fabrikar.com/forums/index.php?wiki/display-list-filter-horizontally/

Yes, sure, I will test it with Gantry 5 and let you know. I am updating from Github. Please can you confirm that the following procedure is ok for my update on local server?
1) download the zip file from the link for Fabrik 3.2+
2) extract the files
3) delete the folder fabrik-build
4) select all of the files and folders extracted (without fabrik-build)
5) copy them into htdocs - websitename
6) replace everything
7) Post Github update steps

Please can you confirm that steps from 2) to 6) are correct?

Thanks,
Enzo
Yes. Although you missed the most important step, of backing up your site first, typically with Akeeba.

Hugh


Sent from my HTC6545LVW using Tapatalk
 
Yes, I am sorry, I missed writing the first step about the backup.
I have updated everything to Github and it seems everything (the update) went ok.
I can confirm you that the Filters with 3.8.1 appear horizontally without modifying the fabrik-filters.php file. I am using Gantry 5.
Thank you very very much: the filters layout is exactly how imagined in my mind (labels above the fields).
For future development, an alternative layout could have labels inside the fields disappearing after clicking on that, but it is perfect as it is now; I like it very much.
Please let me know if you would need some particular tests of Fabrik features with Gantry 5.

-- Enzo
 
The problem with using HTML 5 tooltips (titles inside the fields) is that as soon as you start typing, they are gone. So with lots of filters, knowing which one is which becomes problematic. Also, when the list reloads (without resetfilters) so they already have values, you'd have no way of knowing which was which.

Tips inside fields are good for giving additional info, or examples of the expected input, but are of limited use for labels, IMHO.

Btw, I just committed a change which pivots the filter grid back to the way it used to render, see this thread for details:

http://fabrikar.com/forums/index.ph...te-just-now-filter-display-has-changed.47897/

-- hugh
 
Thanks so much for the suggestion about the tooltips, I didn't realize the consequences about the disappearing titles. Thanks for the link, I am monitoring the discussion. Last time I updated from Github was on Thursday and noticed that the order of the horizontal elements changed. I liked the previous layout because previously arranged the elements in a certain order. Before correcting my website, I am writing to ask if new amendements about the filters are still expected or if I can download the actual version of Github.

Thanks,
Enzo
 
After updating from Github some lists return the following error:

Notice: Undefined offset: 7 in C:/xampp/htdocs/websitename/libraries/fabrik/fabrik/Helpers/ArrayHelper.php on line 529

I think this error is caused by the number of columns of the filters. I would not prefer to change the order of my elements to let work ok again the filters because I am not sure to find a good compromise between the order of elements in the forms and the order of elements for the filters.
 
Last edited:
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top