- Last updated : Sep 06, 2017
- Category : Joomla
Filter and Search module for Joomla and K2. This module can filter your K2 content by several extra fields, tags, category, item text and a lot of other fields in the same time.
Compatible with Joomla 2.5 / 3.x and the latest K2 version.
This module can filter your K2 content by several extra fields, tags, category, item text and a lot of other fields in the same time. It is very flexible to use.
This module consists of two parts:
- module part (mod_k2_filter);
- plugin part that provides a search function.
With the module purchase, you will get one year free support and updates.
- Display search fields as text field, drop-down select, multi-select, slider, slider with range value select, radio, tag (ability for multiple tags select), category, item title (text and A-Z), item text, item rating, item creation/publish dates;
- Restrict search to specific category (static by category ID(s) and auto by the category you are viewing);
- Order search fields; Display search fields in several columns;
- Order search results by some extrafield value;
- Display search results in category view (category template);
- Auto-submit function;
- Function to allow search only if all the fields are selected;
- AJAX search results;
- Chained (dependent) fields (connected fields);
- Multi-language support.
19.08.2017 Compatible with K2 2.8.x
Compatible with Joomla 3.7
PHP 7.1 compatibility.
Compatible with K2 2.7.x;
* Template changes;
* Some other improvements.
* Template changes;
* Added new fields connection mode.
* Added new function - Dynamic values in select boxes;
Useful only with ajax search. Updates all values in the filters based on selected value in some other field;
* Changed filters manager into the backend and now it is easier (You need to re-configure your filter fields!).
Now it is single select box - "Select filter fields", which combines 'Filter type', 'Select extra field' and 'Order' params.
* Ajax search now updates url with history.pushState();
* Added new param for change ajax results container;
* Responsive filter module layout, by defualt now. 'Number of cols' param should be set to '0';
* $json->decode function replaced with native php function json_decode (increase a speed).
19.04.2015 It is a live and compatible with the latest K2 and Joomla versions.
21.12.2014 Compatible with K2 2.6.9
- Backup your site;
- Install the module part via Joomla! extensions manager;
- Install the plugin part;
- Enable (publish up) the plugin part;
- Adjust the module parameters.
- Assign the module to specific position and enable it.
- Select what extrafields you want to show in "Select filter fields" parameter.
- Select filter type for extrafields fields.
- Drag and drop selected value for change fields ordering.
Change search results view options:
In case if you use 'Generic' template for search results, you can change it in K2 generic parameters section 'Layout & view options for Search & Date listings'.
Also, you can manually edit template file - plugins\system\k2filter\K2Filter\templates\filter.php You can override this file as standard k2 template file in your_template/html/com_k2 folder.
Also, you can use category template, see 'Search results template' module parameter. It will also require to fill 'Category Id' parameter for get template parameters from this category. In this case it uses your category template files.
- sh404sef compatibility:
If you use sh404sef at your website, you need to add new condition in /components/com_k2/sef_ext/com_k2.php
* From version K2 2.7 you need to modify this file - /plugins/sh404sefextplugins/k2/adapters/com_k2.v2.php
Find the following block :
case 'search' :
$title = 'search';
$title = $searchword;
And place new block after it:
case 'filter' :
$title = 'filter';
$title = $searchword;
Then, you need to clear sh404sef links cache.
- How to show search ordering box, when category template enabled:
You need to add it manually to your k2 category.php template file. You can find the code here - plugins/system/k2filter/K2Filter/templates/filter.php
Find the block <div class="k2filter-toolbox" ............ (it is between <!--added K2FSM -->)
You need to copy the whole block and put it into your category.php template file with a condition:
Then, you can find and remove some extra ordering options.
If you need more support, you can contact us here