Skip to content

Kirby 3.5.7.1

panel

Options for the Panel

Disabling the Panel

If you don't need the Panel at all and you just want to work in your content folder, you can switch the Panel off in your config file.

/site/config/config.php
return [
  'panel' => false
];

Allow the Panel to be installed on a remote server

As a security measure, you cannot install the Panel on a public server by default. To allow this, you can enable the panel.install option:

/site/config/config.php
return [
  'panel' =>[
    'install' => true
  ]
];

It's recommended to remove this setting after the installation on your remote server is complete.

Moving the Panel to a different URL

If you want to add a little bit of additional security to your site and hide the Panel behind a different URL, you can set the URL slug in your config.

/site/config/config.php
return [
  'panel' => [
    'slug' => 'super-secret-admin-area'
  ]
];

Your Panel is now accessible at http://yourdomain.com/super-secret-admin-area

Custom Panel CSS

We have made the design of the Panel as usable, beautiful and reduced as possible so that you or your clients can fully concentrate on creating content. However, if you want to spice it up a little or adjust to your or your clients branding, you can do that with your own custom stylesheet file. Add it to your config.php file like this:

/site/config/config.php
return [
  'panel' => [
    'css' => 'assets/css/custom-panel.css'
  ]
];

Check out the following cookbook recipe for some examples:

Custom Panel JS

You can also add your own custom Panel scripts in the config.php, giving you even more power to bend the Panel to your liking.

/site/config/config.php
return [
  'panel' => [
    'js' => 'assets/js/panel.js'
  ]
];

Default Panel language

You can set the default Panel language that is used before a user logs in or when the user does not have a valid language configured:

/site/config/config.php
return [
  'panel' => [
    'language' => 'de'
  ]
];
Since 3.5.1

If the Panel language is not configured, Kirby will default to English on single-language sites and the default content language on multi-language sites.

KirbyText/Markdown

If false, the Panel formatting buttons and drag and drop for files and links will create regular Markdown instead of KirbyTags.

/site/config/config.php
return [
  'panel' => [
    'kirbytext' => false
  ]
];

Drag texts

Since 3.4.3

You can define custom callback functions (pageDragText or fileDragText) for the text that gets inserted when dragging a page or a file on a textarea, e.g.

return [
  'panel' => [
        'kirbytext' => [
            'fileDragText' => function(Kirby\Cms\File $file, $url) {
                if($file->extension() === 'jpg') {
                    return sprintf('(screenshot: %s)', $url);
                }

                if($file->type() === 'video') {
                    return sprintf('(video: %s loop: true)', $url);
                }

                return null;
            },
            'pageDragText' => function (Kirby\Cms\Page $page) {
                return sprintf('Check out this great page: %s', $page->url());
            },

        ],
    ],
];