enhanced-toolbar-link-dialog
enhanced-toolbar-link-dialog copied to clipboard
Extend Kirby's default link dialog with search functionality, allowing you to easily create links to existing or external pages at your fingertips.
Enhanced Toolbar Link Dialog
This plugin extends the default link dialog with a search functionality. This makes it possible, to create links to existing or external pages.
Configuration
These are all available configuration options and their default values.
| Option | Description | Type | Default |
|---|---|---|---|
title |
Format the page title of the result list using Kirby Query Language. | string |
{{ page.title }} |
filter |
Filter the result list. Learn how to use filterBy. |
array |
null |
sort |
Sort the result list. Learn how to use sortBy. |
array |
null |
qualified |
Prefix every link with your current Site-Url. | boolean |
false |
translations |
Override plugin translations. | array |
[] |
Usage
// site/config/config.php
return [
"gearsdigital.enhanced-toolbar-link-dialog" => [
"title" => "{{ page.title }}",
"filter" => null,
"sort" => null,
"qualified" => false,
"translations" => []
]
];
Installation
Composer (recommended)
composer require gearsdigital/enhanced-toolbar-link-dialog
Download
Download the latest version, copy all files to /site/plugins/enhanced-toolbar-link-dialog.
Git submodule
git submodule add https://github.com/gearsdigital/enhanced-toolbar-link-dialog.git site/plugins/enhanced-toolbar-link-dialog
FAQ
Can I use this plugin with Kirby Blocks?
Since version 3.0.0, Blocks are supported, and it works with default textareas as well.
Can I link to different sites?
Yes, absolutely. Just write (or paste) the URL into the Link field.
Can I create anchor only links?
It is possible to have anchor only links if you want to jump to a specific part of the same page you're currently editing - just leave the Link-Field empty and fill the Anchor-Field.
Can I customize the result list page title?
Yes, you can use the option title to build a title that fit your needs by using Kirby Query Language.
Within a query you have access to a page, site and kirby object.
By setting "title"=> "{{page.title}} [{{page.parent.title}}]" the title will be shown as Mountains [Photography].
Can I show only pages that match some specific criteria?
For sure! By setting "filter"=> ['status', 'listed'] only listed pages are shown. You study the
Filtering compendium to learn more about filtering collections in Kirby.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Localization
This is the list of all available translation keys:
| Key | Value |
|---|---|
gearsdigital.enhanced-toolbar-link-dialog.anchor.title |
Anchor |
gearsdigital.enhanced-toolbar-link-dialog.field.autosuggest.placeholder |
Enter a URL or search termโฆ |
You can override translations by adding this to your site config.
// site/config/config.php
return [
"gearsdigital.enhanced-toolbar-link-dialog" => [
"translations" => [
"en" => [
"gearsdigital.enhanced-toolbar-link-dialog.autosuggest.placeholder" => "I'm overridden!",
],
],
]
]
Available languages
- English (default)
- German ๐ฉ๐ช
- French ๐ซ๐ท
- Dutch ๐ณ๐ฑ
- Danish ๐ฉ๐ฐ
- Norwegian ๐ณ๐ด
- Swedish ๐ธ๐ช
- Islandic ๐ฎ๐ธ