[SOLVED]about default_filters.php

samani

Member
hi
I have some question about filter that show above the list:
1-why fabrik use table to show the filter when a div is better than table.is there any tip?
2-In this wiki page you say :
"Since Fabrik3.5 filters are rendered in layouts and must be modified by overriding \components\com_fabrik\layouts\list\fabrik-filters.php"
what means "overriding"? i create the same path in mythemplate/html/com_fabrik/layouts/list/fabrik_filters.php but the file was not included in my page.
3- how to show filter horizetally? i use this link but it's not work. Can i use div and use CSS3 for that?

I can write CSS or HTML or little PHP for that if you give me a general solution.
tnx.
 
1 - whichever way we do it, there will always be people who think the other way is better. :) That's one of the reasons we use layouts, so you can override the layout if you want.

2 - As per the wiki ...

http://fabrikar.com/forums/index.php?wiki/jlayouts/#list-layouts

... it's /templates/{current-joomla-template}/html/layouts/com_fabrik, not /templates/{current-joomla-template}/html/com_fabrik/layouts. That's a J! thing, not a Fabrik thing. You can also override on a per template basis (which I need to add to the wiki) in ./components/views/list/<yourtemplate>/layouts/list

3 - You would need to do it in PHP, in that override. As you can see from the code, I've started work on a way to specify the number of columns to use for the filters, but it's not done yet. You'll need to rewrite that section from around line 31 to 97 to use divs, and probably the Bootstrap grid CSS.

You could probably do it with our FabrikHelperHTML::bootstrapGrid() function. If you look at fabrik-filters-modal.php, how that builds the $cols[] array from the filters array and passes it to bootstrapGrid().

-- hugh
 
I try to get the searchall element in horiz of other filter element but i can't.can you help me?
i use any other code in other tmpl such as div,bootstrap,popup etc.
2016-11-12_20-02-40.jpg

how to do it?
tnx
 
'Search all' is in default_buttons.php
So you must create a custom template, remove 'Search all' from default_buttons.php and include it in fabrik_filters.php
 
I copy a block code of from default_buttons.php to fabrik_filters.php but it was not working. What code render the 'search all' ?
 
Last edited:
The search all filter is built in default_buttons.php, starting around line 124. You'll have to refactor the code to move that to where you are building the rest of the filters.

-- hugh
 
I refactor the code and it work.
To remove rhe old searchall:
So you must create a custom template
Can i override that?
i did work on it according this wiki.
(i test override but not work, Is override work only for "default_filter.php" only? or work for any .php files in the "tmpl" directory?)
 
Last edited:
default_filters.php doesn't exist at all in recent bootstrap or div list template.
If you want to include "search all" in the general filter block you must create a custom template (copy bootstrap or div), modify default_buttons.php and override fabrik_filters.php
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top