Sorry, we don't support your browser.  Install a modern browser
This post is closed.

Panel Menu with Attributes like Target Blank

The ability to freely define the panel menu on the left-hand side is great. For some applications, however, it would be great if you could, for example, open the links in a new window. I think this should, at least in my eyes, not be a huge problem to implement.

Example:

return [
  'panel' => [
    'menu' => [
      'site'
      'notes' => [
        'icon'  => 'pen',
        'label' => 'External Link',
        'link'  => 'https://example.com',
        'target'  => '_blank',
      ]
    ]
  ]
];

Or alternatively as another array:

return [
  'panel' => [
    'menu' => [
      'site'
      'notes' => [
        'icon'  => 'pen',
        'label' => 'External Link',
        'link'  => 'https://example.com',
        'attributes'  => [
          'target' => '_blank',
          'title' => 'Custom'
        ]
      ]
    ]
  ]
];
a year ago
Changed the status to
In progress
a year ago
1
Changed the status to
In upcoming releases
a year ago
Changed the status to
Completed
a year ago

Is there any documentation about this? It’s not documented here: https://getkirby.com/docs/reference/system/options/panel/panel-menu#create-your-own-entry

6 months ago

@Oliver.mayer Actually documented in there:

Additionally, you can also pass the target and title attributes.

6 months ago

Totally missed this, sorry!

6 months ago