Blog Sections Open

Expanding a Third Menu Level Only for the Active Wayfinder Branch

A menu-architecture pattern for showing a third level only inside the active Wayfinder branch.

Wayfinder projects often wanted one subtle navigation rule: keep the site expanded to level two everywhere, but show level three only inside the currently active section. The brute-force answer was usually a nested Wayfinder call, but that doubled the render cost.

The desired structure

The requirement was not “show everything.” It was more specific:

  • every section should expose level two
  • only the active second-level branch should expand to level three
  • the rest of the menu should stay compact

Why the naive approach hurt performance

Embedding another Wayfinder call inside the menu chunk can solve the structure problem, but it also forces an extra menu build during render. On larger trees, that kind of nested output was noticeable.

The practical direction

The historical value of this topic is architectural: treat the active branch as a special case, and pass that state into the template instead of recursively rebuilding the whole menu tree. In Evolution CMS terms, this usually means leaning on active-branch classes, conditional row templates, or a carefully scoped second pass only for the current branch.

Why this belongs in the timeline

Many later menu posts in the archive solve pieces of the same problem, but this one captures the performance angle clearly. It shows the moment when “just nest one more call” stopped being acceptable and teams started treating navigation structure as an optimization problem.

Related posts

Making Wayfinder Expand the Active Menu Branch
Keeping Active States Correct in Wayfinder Menus with Dropdowns

Newer post

Building Two Independent Menus on One Page with Wayfinder

A reusable menu pattern for pages that need two separate navigation groups at once.

Older post

Loading Child Documents into jQuery UI Tabs with Wayfinder in Evo 1.0.5

A historical guide for building tabbed interfaces by combining Wayfinder navigation with child-resource loading.