Update to Kirby 5
This commit is contained in:
parent
5d9979fca8
commit
0fefc5e2e1
472 changed files with 30853 additions and 10301 deletions
|
@ -1,5 +1,8 @@
|
|||
<?php
|
||||
|
||||
use Kirby\Cms\App;
|
||||
use Kirby\Cms\Find;
|
||||
use Kirby\Panel\Ui\Buttons\LanguagesDropdown;
|
||||
|
||||
$files = require __DIR__ . '/../files/dropdowns.php';
|
||||
|
||||
|
@ -10,12 +13,34 @@ return [
|
|||
return Find::page($path)->panel()->dropdown();
|
||||
}
|
||||
],
|
||||
'page.languages' => [
|
||||
'pattern' => 'pages/(:any)/languages',
|
||||
'options' => function (string $path) {
|
||||
$page = Find::page($path);
|
||||
return (new LanguagesDropdown($page))->options();
|
||||
}
|
||||
],
|
||||
'page.file' => [
|
||||
'pattern' => '(pages/.*?)/files/(:any)',
|
||||
'options' => $files['file']
|
||||
],
|
||||
'page.file.languages' => [
|
||||
'pattern' => '(pages/.*?)/files/(:any)/languages',
|
||||
'options' => $files['language']
|
||||
],
|
||||
'site.languages' => [
|
||||
'pattern' => 'site/languages',
|
||||
'options' => function () {
|
||||
$site = App::instance()->site();
|
||||
return (new LanguagesDropdown($site))->options();
|
||||
}
|
||||
],
|
||||
'site.file' => [
|
||||
'pattern' => '(site)/files/(:any)',
|
||||
'options' => $files['file']
|
||||
],
|
||||
'site.file.languages' => [
|
||||
'pattern' => '(site)/files/(:any)/languages',
|
||||
'options' => $files['language']
|
||||
]
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue