A simple shortcut to open a page in Kirby Panel

I use the Kirby CMS for my website. When editing the content, you have to switch regularly from the frontend to the panel to edit the page that has just been called up. A possible solution for this is to use the Admin Bar plugin. However, this was not necessary for my purposes. Since I work a lot with the keyboard, I just wanted a simple shortcut.

To achieve this, I placed a link on the page and added the accesskey attribute. This allows an element to be provided with a keyboard shortcut.

<?php if ($kirby->user()): ?>
  <a href="<?= $page->panel()->url() ?>" target="_blank" accesskey="p">EDIT</a>
<?php endif ?>

In this way the link is only displayed to logged-in users and can be fired with a key combination. In my case with ⌃ + ⌥ + p – but this depends on the browser and operating system. MDN has an overview of the differences between various browsers.

Sources


Kirby PHP
Latest

The legendary Marble Machine

Exactly ten years ago Wintergatan published the famous video of the amazing Marble Machine.

Featured

It‘s the rests what makes the groove!

Matthias Ott recently published a blog post which really resonates with me. Starting from a musical point of view, he wrote about making space. This is my reply (or addition).

pageview counter pixel