Navigation 4

Verbb Team Verbb Team Sept 2026 5 min read

Blog navigation 4

Navigation 4 is a big one. The menu builder has been rebuilt from scratch, and the headline change is that your edits no longer go live the moment you make them. Move things around, add and remove links, and save the menu when it's ready, or discard the lot and leave the live menu as it was.

Menus are now proper Craft elements too, they can keep themselves up to date, and they load with a lot fewer database queries.

Save the Menu When You're Ready

The new builder is built with React and our shared Plugin Kit components, and everything you do in it is staged. Reorder a whole branch, add a few pages and rename a link or two, and the live menu doesn't change until you click Save menu. Change your mind, and Discard leaves the live menu exactly as it was.

Nav4 build session
Move things around all you like. Nobody's watching yet.

We've renamed "navs" to "menus" everywhere. We never really liked "nav", and the new name carries through to the API with craft.navigation.menu(), getMenuByHandle() and getAllMenus().

Menus are also Craft elements now, which means they can have custom fields of their own, a bit like a Global set that belongs to the menu. Elements usually bring a few extra queries with them, and a menu runs on just about every page, so we wanted to be sure that didn't cost you anything. As it turns out, Navigation 4 makes far fewer queries overall (more on that below).

Mega menu promo panels, footer taglines and calls to action can now be stored on the menu itself. Set up the field layout on the Menu Fields tab, fill it in per site under Menu Content, then fetch the menu with craft.navigation.menu('mainMenu').one() and use its fields like any other element.

Nav4 menu content
Menu-level content, edited right from the builder.

Dynamic Nodes

Navigation has always meant doubling up a little. You add a page to your Structure section, then add it to the menu too. When a whole branch of the menu mirrors a section, that second step is easy to forget every time a new page goes up. A hand-picked menu is exactly what some sites want, though, so Navigation 4 gives you the choice.

Dynamic nodes take care of that branch for you. Pick an entry section, category group, asset volume or Commerce product type, narrow it down with conditions, and set the order. A "News" item can always show your five latest posts, and a "Products" dropdown can follow your product types, without anyone remembering to update the menu. You can still add children by hand too, and they'll appear before the automatic list.

Nav4 dynamic add
The latest five posts, with no menu maintenance required.

Section Menus, Breadcrumbs and Active States

Your main menu is often only the start. You might also want a sidebar of pages in the current section, a breadcrumb trail, or a dropdown that stays highlighted while someone browses the pages under it.

The new Context API builds these from the menus you already have. Start with craft.navigation.context('mainMenu') and ask for the current branch, nearby pages, children or ancestors, without maintaining a separate sidebar menu or writing parent queries in your templates. Active states are smarter too, so you can style the current link separately from its section and keep "Products" highlighted while someone looks at a single product. For breadcrumbs, craft.navigation.menuBreadcrumbs() follows your menu, and craft.navigation.urlBreadcrumbs() follows the URL.

Fewer Queries and Built-In Caching

Every query a menu makes runs again on every page that shows it, so a few extra here and there soon add up across a site.

Navigation 4 assembles a menu's hierarchy in memory instead of querying for children at every level, and loads linked entries, categories and assets together. It can also cache the assembled menu and refresh it when relevant content changes, while still working out the current page's active state on each request.

In our tests, a two-level, 60-link menu went from 20 database queries in Navigation 3 to 5 in Navigation 4, using the same menu and template. A similar 50-link menu went from 15 to 5. These were repeat page requests in our local Craft 5 test environment, so your numbers will depend on your menus and templates, but nested menus have the most to gain.

Nav4 query comparison
Your database says thanks.

The defaults are a good place to start. For a particularly big menu, the performance guide covers the options, how to measure the difference, and the template patterns that add extra queries.

Nav4 performance settings
Caching works out of the box, with settings for when you need more control.

Coming From Another Menu Plugin

Navigation 4 can copy menus from seven other navigation plugins, which are FreeNav, Menu by Rewish, MenuBuilder, Navigate, Navkit, Olivemenus and tka navigation. The original menus are left untouched, so you can compare the results before changing your templates. The migration guides cover each one.

If your menu mirrors your entries exactly, a Structure section might be all you need. Navigation is for when a menu mixes entries with custom URLs, headings and links to other sites, needs fields of its own, or changes from site to site.

Extras

  • Custom URLs, URL suffixes and linked elements can differ per site, node titles can be translated how you choose, and you can copy individual nodes to another site.
  • GraphQL queries for menus, contextual navigation and menu breadcrumbs.
  • A new Group/column node type for organising mega menus and dropdowns into sections.
  • Nodes linked to a deleted element are disabled, then re-enabled if the element is restored.
  • Updated Feed Me mappings, and craft.navigation.invalidateCache() for clearing Navigation's cache from your own workflow, including Blitz setups.

The full changelog (opens new window) has the rest.

Upgrading From Navigation 3

Most of the upgrade happens automatically. Existing menus migrate across, including the switch from "nav" to "menu", and the older Twig and PHP APIs keep working with deprecation notices while you update your templates. A few things are worth checking first.

  • getActiveNode() now returns the deepest node matching the current URL. If you relied on it returning a parent for section navigation, the Context API is a good replacement.
  • Custom URLs no longer expand environment variables or Craft aliases. Use relative URLs, literal destinations or the {site.baseUrl} token.
  • Passive and group nodes can render as a <span> instead of an <a>, so update any custom templates that assume every node is a link.

Navigation 4 needs Craft 5.9.11 or later. Back up your site, try the upgrade on staging, and keep the upgrade guide handy for the template examples.

Navigation 4 (opens new window) is available today for Craft 5. Happy menu building!