Kirby allows for the storage of value lists using its select, tags or checkboxes fields but it doesn't offer ways to filter items by those values. List Filters closes this gap by providing includes
and excludes
collection filters.
Note
Please check out the online documentation at kirby.hananils.de/plugins/list-filters for further information.
The plugin adds the following filters:
includes
: finds items including the given values (likein_array
)includes some
: finds items including some of the given valuesincludes all
: finds items including all of the given valuesexcludes
: finds items excluding the given values (likein_array
)excludes some
: finds items excluding some of the given valuesexcludes all
: finds items excluding all of the given values
$plugins = $plugins->filterBy('category', 'includes all', ['field', 'section']);
hananils.list-filters.insensitive
: defaults totrue
, set tofalse
if you want to enable case sensitive matching.
Download and copy this repository to /site/plugins/list-filters
.
git submodule add https://github.com/hananils/kirby-list-filters.git site/plugins/list-filters
composer require hananils/kirby-list-filters
This plugin is provided freely under the MIT license by hana+nils · Büro für Gestaltung.
We create visual designs for digital and analog media.