Skip to content

Block-based site menus #554

@thibaudcolas

Description

@thibaudcolas

We should introduce more advanced menu management on this demo site, to demonstrate Wagtail’s capabilities that are relevant on real-world projects, and so we can improve this type of interface in the CMS.

As-is menus

Currently this demo site has a very simple main menu implementation that relies on Wagtail’s built-in show_in_menus:

def top_menu(context, parent, calling_page=None):
menuitems = parent.get_children().live().in_menu()
for menuitem in menuitems:

There are no other menus on the site.

Desired state

Either refactor the main menu to use StreamField blocks, or introduce a new "footer menu" using blocks, or both. This would include support for:

As an example, see the wagtail.org navigation models and blocks.

Working on this

I think the first step should be confirming whether we want to do this for the existing main menu, or a new footer menu, or both. It’s probably simpler to do it for the footer first, but ideally in a way that is suitable for both use cases.

For the footer, we can have a two-level menu like wagtail.org, where the first "sections" level are headings that aren’t clickable, and within each section there is a list of menu items. Each of which can be links to pages, or external, or documents.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions