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.
Package info
github.com/hananils/kirby-list-filters
Type:kirby-plugin
pkg:composer/hananils/kirby-list-filters
Requires
- php: ^8.2
Requires (Dev)
- ergebnis/composer-normalize: ^2.47
- rector/rector: ^2.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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.
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']);
Installation
By default, plugins in Kirby reside in a special folder located at /site/plugins. Each plugin is installed in its proprietary subfolder. This installation can be handled in four different ways: you can either install them manually or manage them using Kirby CLI, Git submodules or Composer. You can install List Filters either way and should choose the method suiting your project best.
Please note that all examples given here assume you are using the default plugin root. If you changed your plugin root, e. g. with a custom folder setup, you’ll also have to adjust the paths given in this guide. For further information on how to manage plugins, please read the official Kirby plugin introduction.
Download
Download and copy this repository to /site/plugins/list-filters.
Kirby CLI
kirby plugin:install hananils/kirby-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
Documentation
Where possible, files contain inline annotations. For extended documentation, please visit our dedicated plugin site at kirby.hananils.de/plugins/list-filters.
Reference
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.

