1

Wagtail documentation explains how to:

Let our model be CustomManager and its admin url be /admin/custom_manager/.

Using a hook, we can add a link to our page on to the first level of the admin menu:

@hooks.register('register_admin_menu_item')
def register_edit_menu_item():
  return MenuItem( 'Custom Manager', '/admin/custom_manager/', classnames='icon icon-folder-inverse', order=1000)

But how can we add this link to a sub-menu/group, when our model is not a wagtail model?

Zini
  • 53
  • 7
  • Is https://docs.wagtail.org/en/stable/extending/admin_views.html#adding-a-group-of-menu-items what you're looking for? – gasman Apr 08 '22 at 14:10
  • @gasman thank you, this allows to add custom links to a sub-menu, but can I in this a sub-menu display a link to a model extending ModelAdmin alongside a link to a custom model? – Zini Apr 08 '22 at 16:12

0 Answers0