A new plugin is born: https://github.com/jenstornell/kirby-menu-editor
Use it like this:
or like this:
<?php foreach( $page->addresses()->toStructure() as $item ) : ?>
<?php $attributes = menuEditorAttributes($item); ?>
<a href="<?php echo page( $item->page() )->url(); ?>"<?php echo $attributes; ?>></a>
More info about the plugin at https://github.com/jenstornell/kirby-menu-editor
Wow, that’s great! I wanted to build something like that for a client project with three separate menus some time ago.
For clients I think I’d need to change the
page field to a select field, they won’t ever understand this thing
Thanks a lot
You can modify the plugin… or you can override it like this:
label: My menu
The pitfall would be that you need to set the options manually.
… or this should work:
Yes, you are right, it does. I forgot about that. Then the override syntax would be:
label: My menu
I just released a new version of https://github.com/jenstornell/kirby-menu-editor
It fixes some major bugs and there are now three types of menus that can be added.
Default - Most common case menus
Minimal - Title and page only
Full - All that is in the default setup but also image and description.
More info in the repo.
I closed this repo today. I now think adding a structure field and then adding the code into a template/snippet could be done quite simple even without this plugins. Therefor this plugin did not have a purpose. It only had 4 likes on Github and was not one of the most liked plugins anyway.
Maybe close this post?