seehat
1
Is there a way to set the name of a panel view dynamically by a kirby option like the following example?
import View from "./components/view.vue";
panel.plugin("mgfagency/helpsection", {
views: {
helpsection: {
label: option('helpviewname', "Hilfe"),
icon: "wand",
menu: true,
component: View
}
}
});
I need it for this:
It is been quite a while since you asked, however you can translate the label by omitting it completly and set a proper value in your index.php
.
I fixed that and opended a PR: https://github.com/mgfagency/kirby-helpsection/pull/1
import View from "./components/view.vue";
panel.plugin("mgfagency/helpsection", {
views: {
helpsection: {
icon: "wand",
menu: true,
component: View
}
}
});
Kirby::plugin(
'mgfagency/helpsection',
[
'translations' => [
'en' => [
'view.helpsection' => 'Help',
],
'de' => [
'view.helpsection' => 'Hilfe',
],
],
]
);