Search
Add your own search engine
If you are not happy with our built-in search for collections, you can create your own.
Keep in mind that the search component will be used for all searches of collections (e.g. pages, users, fields) that use the ->search()
method.
To replace the search for just one specific type of collection (e.g. for pages only), fall back on Kirby's native component for the rest:
Name |
Type |
Default |
Description |
$kirby * |
Kirby\Cms\App |
– |
|
$collection * |
Kirby\Cms\Collection |
– |
Collection of searchable models |
$query |
string |null |
null |
|
$params |
array |string |
[ ] |
|
Kirby\Cms\Collection