hananils / kirby-list-filters
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.
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:kirby-plugin
Requires
- php: ^8.2
Requires (Dev)
- ergebnis/composer-normalize: ^2.47
- rector/rector: ^2.0
README
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.
Usage
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
Examples
$plugins = $plugins->filterBy('category', 'includes all', ['field', 'section']);
Options
hananils.list-filters.insensitive
: defaults totrue
, set tofalse
if you want to enable case sensitive matching.
Installation
Download
Download and copy this repository to /site/plugins/list-filters
.
Git submodule
git submodule add https://github.com/hananils/kirby-list-filters.git site/plugins/list-filters
Composer
composer require hananils/kirby-list-filters
License
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.