Skip to content

Create menus programmatically #410

Description

@kiwiheretic

How would I create wagtailmenus menu programatically (that is not through the wagtail admin). If we assume that all the necessary pages exist in the database then what would this look like?

For instance I imagine we would create the main menu record and then add all the main menu item records to it somehow and pass in the relevant pages to the constructor. However even though I can find the model for menu items I haven't managed to find the model for the main top record menu itself. Any idea on how I would go about this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions