Custom menu items with simple redirects (no active state possible)?

Hi,

We would like to link some native and fixed sub-pages directly in the panel menu because they need to be called frequently.

For this I created a simple area plugin without a vue component, which only contains the static link. The forwarding and the link in the menu also work without any problems - unfortunately it does not get an optical “active” state when I am on the corresponding page.

That the configuration right now:

'areas' => [
        […],
        'ensemble' => [
            'label' => 'Ensemble',
            'icon' => 'star',
            'menu' => true,
            'link' => 'pages/ensemble-data',
        ],
        […],
]

On custom panel views, on the other hand, this works perfectly without any further configuration.

Can I somehow tell the panel that this menu item should be highlighted when the user is on a specific subpage? I couldn’t find anything about this in the docs? Maybe there is a private undocumented function for that? :eyes:

Hm, I have a feeling you would have to extend the page view here, because without a view pattern, it probably doesn’t recognize it :thinking:

Oh :pensive:… I wanted to avoid that because this page works excellent with blueprints and the fields that are included with Kirby.

Unfortunately, this setting alone did not help either (I tried all variations, with /panel, panel, without pages, with pages…).

'ensemble' => [
    'label' => 'Ensemble',
    'icon' => 'star',
    'menu' => true,
    'link' => 'pages/ensemble-data',
    'views' => [
        [
            'pattern' => 'pages/ensemble-data',
            'action' => function () {
                return [];
            },
        ],
    ],
],

Is there any way to include an entire blueprint including all sections and fields directly via Vue, so that I don’t have to build everything myself? If not, then the customer has to live with it until it becomes possible at some point… :yum:

Thank you anyway

I don’t have an answer, would have to play around myself how to best achieve that.