Skip to main content

Wagtail Nav Menus

Wagtail Nav Menus is a app to provide highly customizable menus in wagtail by leveraging StreamFields.

Why

Remember when websites had tree structures with logical menus that followed the same structure? For many those days are gone. We are asked to create arbitrary menu items, place value props in menus that aren’t even links, and build highly interactive menus with Javascript.

Wagtail Nav Menus addresses this by using stream fields to support arbitrary items in the menu and gives you options to render the menus as both django templates or json for your js tooling to consume.

demo.png

Built in Components

  • Nav Category - a grouping of other components - for things like sub navigation

  • Page Link - Link to a wagtail Page

  • External Link - Django URLField link

  • Django Link - Reverse django view lookups

  • Relative URL - Regex enforced relative links

  • Image

  • Html

Install

  1. Install wagtail-nav-menus with pip.

  2. Add wagtail_nav_menus to INSTALLED_APPS.

Settings

You can add other streamfields like this:

from wagtail_nav_menus.defaults import WAGTAIL_NAV_MENU_TYPES_DEFAULT

WAGTAIL_NAV_MENU_TYPES = WAGTAIL_NAV_MENU_TYPES_DEFAULT + [
    ('page_link_with_image', 'nav_menus_ext.models', 'InternalPageImageBlock'),
    ('page_link_with_image', 'nav_menus_ext.models', 'NavAdvertBlock'),
]

The schema here is (‘name’, ‘module_path’, ‘class name’)

Edit menu name choices. The default is top and footer. These represent different menus for your webpage. The names are arbitrary - but you will look them up by name in templates.

WAGTAIL_NAV_MENU_CHOICES_DEFAULT = (
    ("top", "Top"),
    ("footer", "Footer"),
)

Usage

Nav Menus should appear in wagtail’s settings sidebar tab. CMS uses can control them here.

You may use some template tags to use these in your site.

get_nav_menu

Use this to insert the menu using django templates:

{% load nav_menu_tags %}
{% get_nav_menu 'footer' %}

See the [templates folder](wagtail_nav_menus/templates/) in this repo for examples of rendering the menu. You will want to copy these into your project’s template folder to extend them.

get_nav_menu_json

Use this to get the menu as a json object.

{% load nav_menu_tags %}
{% get_nav_menu_json 'top' as top %}
<div data-menu='{{ top }}'></div>

API Usage

If using Django Rest Framework to access the menu data, this module provides some tools to get started.

Add NavMenuViewSet to your Rest Framework Router.

from wagtail_nav_menus.viewsets import NavMenuViewSet

Metadata

Release files for wagtail-nav-menus 3.15.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wagtail-nav-menus 3.15.0
File Size Uploaded Provenance Actions
wagtail_nav_menus-3.15.0.tar.gz 189.8 kB With provenance Details for wagtail_nav_menus-3.15.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wagtail-nav-menus 3.15.0
File Interpreter ABI Platform Actions
wagtail_nav_menus-3.15.0-py3-none-any.whl Python 3 none any Details for wagtail_nav_menus-3.15.0-py3-none-any.whl

Total release size: 210.8 kB

Release files / wagtail_nav_menus-3.15.0.tar.gz

Download URL wagtail_nav_menus-3.15.0.tar.gz
Size 189.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f60ff7e7814f9134b8e6b322a6d736e7c9b0fd2aebb912265bcda08ddcebf3c9
BLAKE2b-256 checksum
How to use checksums
83c973b5e09a8c92e5c6c6925fb1e5f8df3863bbe4ba08eac422275ebc131fc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.14.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitLab CI/CD, verified by PyPI on Oct 30, 2026.

Transparency log

Release files / wagtail_nav_menus-3.15.0-py3-none-any.whl

Download URL wagtail_nav_menus-3.15.0-py3-none-any.whl
Size 21.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4bf84ee6ddf7ef375ff9b657daf09efc7657d248504c74fe4d4766a07381378
BLAKE2b-256 checksum
How to use checksums
2d3a9fa09b39b318619b572ddf2fac0332d464907f586b4f488225cd09444a5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.14.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitLab CI/CD, verified by PyPI on Oct 30, 2026.

Transparency log

Security for wagtail-nav-menus 3.15.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for wagtail_nav_menus-3.15.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitLab CI/CD, verified by PyPI on Oct 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.15.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page