Issue
There are some custom menu items in the admin's menu, it is easy to order them (the items marked in red below).
Just set menu_order
of the custom ModelAdmin
object.
The question is how to reorder the built-in menu items, such as Pages, Images, Media, and Settings.
Solution
You can use the construct_main_menu
hook to modify existing menu items.
For example, to move the Pages item to the bottom, place this code in a wagtail_hooks.py
file within one of your apps:
from wagtail import hooks
@hooks.register('construct_main_menu')
def reorder_menu_items(request, menu_items):
for item in menu_items:
if item.name == 'explorer': # internal name for the Pages menu item
item.order = 100000
break
Answered By - gasman
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.