How can I change the sidebar from Wagtail?
I am following the Wagtail docs to create navigation, but it is recommended to use it based on "fragments", so I would like to change the sidebar to show "Navigation" or "Menu" instead of "Fragments", is this possible?
But when I use exactly the same as the docs recommend to change the sidebar:
sidebar_content_panels = [
SnippetChooserPanel('advert', Advert),
InlinePanel('related_links', label="Related links"),
]
source to share
The code sidebar_content_panels
is not relevant here - it demonstrates how to add an extra tab to the page editor if your pages contained "main content" and "sidebar content" that you wanted to keep separately. It has nothing to do with the sidebar menu in the Wagtail admin.
It is possible to add new items to the admin menu using the register_admin_menu_item
hook ( http://docs.wagtail.io/en/v1.0/reference/hooks.html#register-admin-menu-item ), but this does not support editing an existing item. so you cannot change the Slices menu label. However, you can take a look at the "wagtailmodeladmin" package at https://github.com/ababic/wagtailmodeladmin - this allows you to configure admin scopes that act like a snippet editor but exist at the top menu level.
source to share
Wagtail allows you to create a custom admin sidebar menu by extending the wagtail ModelAdmin
You can check the example and documentation for the new v2.4 here .
https://docs.wagtail.io/en/v2.4/reference/contrib/modeladmin/index.html#summary-of-features
source to share