Gasim
Gasim

Reputation: 7961

Wagtail how to separate custom page types in sidebar

Is it possible to add custom pages in the admin sidebar and remove the "Pages" link. I want to have different links such as:

Shown in the sidebar and each listing page only shows items based on the custom page. I have been looking in the documentation and the only thing that I found was to add custom URLs to the sidebar but I need to also add custom pages to show listings.

Upvotes: 2

Views: 461

Answers (1)

gasman
gasman

Reputation: 25237

The ModelAdmin module allows you to register page models to appear as new items in the admin menu.

You can add exclude_from_explorer = True to your ModelAdmin definition to hide a page type from the main page explorer, although that won't hide the Pages menu item itself - for that, you would need to define a construct_main_menu hook to run after the menu has been built, and remove it from the list.

Upvotes: 2

Related Questions