Panel search
Panel areas also allow you to add your own search type to the Panel - next to pages, files and users - or even to overwrite these existing search implementations.
In Vue, the search can then be exectued like this:
Search results
A Panel search extension returns results as a simple array with parameters for each item:
Parameter | Type | Description |
---|---|---|
image |
array |
Optional image settings |
icon |
string |
The name of the option icon |
info |
string |
Optional info text on the right |
link |
string |
The url/path which will be visited on click |
text |
string |
The label for the search result |
Custom search type
That's all it takes to create your own search index for your own plugins:
The search will automatically appear in the search dialog, but can also be run manually from your Vue components with …
Extending default search types
You don't like the way the pages search works? Maybe you already have your data in Elastic search or Algolia and you want to use a real search server instead? No problem. It's now super easy to extend and overwrite our core searches.
Reusing core code
When you plan to extend a search, you might want to fall back to Kirby's core behaviour in some cases. This can be done by loading the core code:
Core searches
Area | Search name |
---|---|
site |
pages |
site |
files |
users |
users |