Hello,
i am trying to add the navigation field plugin (GitHub - chrisbeluga/kirby-navigation: Navigation field for getkirby.com), but i do not quite understanding where I should add the config.
The plugin documentation says:
Add the following blueprint to wherever you would like the navigation field to appear.
navigation:
label: Navigation
type: navigation
levels: 5
help: Description of menu or where it is used
width: 1/2
I tried to add this snippet to blueprints/site.yml but without successs. Should it go into some page blueprint?
The plugin shows up in the system page of the panel.
What am i missing here?
Can somebody give me some more context?
Thanks!
Please post your site.yml
where you have added this field.
preset: pages
unlisted: true
navigation:
label: Navigation
type: navigation
levels: 5
help: Description of menu or where it is used
width: 1/2
Other variation i tried.
tabs:
content:
label: Inhalte
preset: pages
unlisted: true
navigation:
label: Navigation
type: navigation
levels: 5
help: Description of menu or where it is used
width: 1/2
I am sure that I am missing an important point.
Preset: pages doesn’t make sense.
You need a field section. For example:
title: Site
sections:
fields:
type: fields
fields:
navigation:
label: Navigation
type: navigation
levels: 5
help: Description of menu or where it is used
Of course, this section could be in a tab or inside columns
I never use presets and I wouldn’t recommend their use. You are much more flexible without them.
Thanks!
Now i have:
site.yml
title: site
tabs:
inhalt:
label: Inhalte
preset: pages
unlisted: true
menu:
label: Menu
sections:
content:
type: fields
fields:
navigation:
label: Navigation
type: navigation
levels: 5
help: Description of menu or where it is used
width: 1/2
Result: now I have two tabs (nice) and in the second tab a section “Fields” and below it says: “No fields yet”.
I tried to configure different othere field types in this structure. This worked. But the navigation field does not show up as expected.
Apparently the “navigation” field type of the plugin is not recognized.
I am using Kirby 3.6.2 with PHP 8.1.5 and Nginx.
How should I debug this? What do you suggest?
Please make sure using the plugin version 2.x for Kirby 3.6.x
Thanks for your suggestion. Yes, i am using version 2.1.2 now. Did not change the result.
Your indentation is not correct…
Oh dear! Yes, that did the trick.
Thanks a lot for your patience.