Add a custom link/model to wagtail's admin sub-menu

352 Views Asked by At

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?

0

There are 0 best solutions below