REDAXO 6

# Navigation as a tree

Menus, side navigation, breadcrumbs and structured data – with nav, the successor of navigation_array.

 
 
 

 

**In development:** REDAXO 6 is being built in the 6.x branch of redaxo/core. The examples reflect the state of November 2026 – names and details may still change before the release.

The AddOn [nav](https://github.com/KLXM/nav) is the successor of navigation_array for REDAXO 6: `Nav` returns the structure as typed items (`NavItem`: label, url, active, current, children …) and tools to resolve it – `walk()`, `flatten()`, `branch()`, `siblings()`, breadcrumbs. The output is your code. Offline categories, those without permission and – with yrewrite – the other domains are left out; records with a detail page can appear as items below their overview. fluid builds its own menu with it.

 
 

 

## Install nav

 
 
 
Terminal
 

```
composer require klxm/nav:^1.0@beta
php bin/console migrate
```

 
 
 
 
 

 

## Menu, breadcrumbs and JSON-LD

 
 
 
Template PHP
 

```
<?php

use Klxm\Nav\Component\NavBreadcrumb;
use Klxm\Nav\Nav;
use Klxm\Nav\NavItem;

use function Redaxo\Core\View\escape;

$nav = new Nav(depth: 1, exclude: [12]);   // erste Ebene und eine darunter, ohne Kategorie 12

// walk(): je Eintrag Markup, $children() rendert die nächste Ebene genauso
echo '<nav><ul>' . $nav->walk(static fn (NavItem $item, Closure $children): string => '<li' . ($item->active ? ' class="active"' : '') . '>'
    . '<a href="' . escape($item->url) . '"' . ($item->current ? ' aria-current="page"' : '') . '>' . escape($item->label) . '</a>'
    . ($item->hasChildren() ? '<ul>' . $children() . '</ul>' : '')
    . '</li>') . '</ul></nav>';

// Seitennavigation: zweite Ebene im Zweig der aktuellen Seite
foreach (new Nav(activeOnly: true)->branch(1) as $item) {
    echo '<a href="' . escape($item->url) . '">' . escape($item->label) . '</a>';
}

// Brotkrumen als einfache Ausgabe, mit strukturierten Daten (Schema.org BreadcrumbList)
echo new NavBreadcrumb($nav, label: 'Sie sind hier', jsonLd: true)->render();
```

 
 
 

Options: start, depth, activeOnly, ignoreOffline, exclude, filter, data, articles, languageId, hidden. Tools: items(), walk(), flatten(), find(), branch(), siblings(), prev(), next(), breadcrumb(), jsonLd(), toArray(); simple outputs NavMenu and NavBreadcrumb.

 
 

 
 
 

Try it

 

## This site is built with REDAXO 6 and fluid.

 

Sign in, tap “Edit” – and change every text, every image and the whole design right here.

 
 
[How editing works](https://fluid.klxm.de/en/fluid/editing/)[See the technology](https://fluid.klxm.de/en/redaxo-6/technology/)


---

Source: https://fluid.klxm.de/en/redaxo-6/navigation/
<style nonce="e23ef97947e376e97a7b329d3ffc8d5a">.fs-455c15fee1{--ncss-grid-min:13rem !important}</style>