---
title: "Create a menu with TypoScript"
manual: "TypoScript Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3tsref:guide-menu@main"
source: "Guide/Menu/Index.rst"
rendered: "2026-09-29T15:38:34+00:00"
---

# Create a menu with TypoScript {#guide-menu}

Until now, we learned how the page *content* is rendered; however, the
page *navigation* is missing.

TYPO3 provides a special data processor, the [menu data processor](https://docs.typo3.org/permalink/t3tsref:menuprocessor@main)
to pass data to render a menu to the Fluid template.

Configure the data processor in TypoScript:

**EXT:my_sitepackage/Configuration/Sets/Main/setup.typoscript**

```typoscript
page = PAGE
page {
  10 = PAGEVIEW
  10 {
    paths.10 = EXT:my_sitepackage/Resources/Private/Templates/Pages/
    # ...
    dataProcessing {
      10 = menu
      10.as = myMainMenu
    }
  }
}

```

And render the menu in your Fluid template. You need at least a
[Minimal site package (see site package tutorial)](https://docs.typo3.org/m/typo3/tutorial-sitepackage/main/en-us/MinimalExample/Index.html#minimal-design)
to keep your templates in its private resources folder, for example
`EXT:my_sitepackage/Resources/Private/Templates`:

**EXT:my_sitepackage/Resources/Private/Templates/Pages/Default.fluid.html**

```html
<header>
  <ul class="navbar-nav">
    <f:for each="{myMainMenu}" as="menuItem">
      <li class="nav-item">
        <a class="nav-link {f:if(condition: menuItem.active, then:'active')}"
          href="{menuItem.link}"
          target="{menuItem.target}"
          title="{menuItem.title}"
        >
          {menuItem.title}
        </a>
      </li>
    </f:for>
  </ul>
</header>
<main>
  <p>Hello World!</p>
</main>

```

Find more examples on how to configure and render menus with TypoScript and
Fluid in chapter
[Main menu of the Site Package Tutorial](https://docs.typo3.org/m/typo3/tutorial-sitepackage/main/en-us/Menu/Index.html#main-menu-creation).

You can find more examples on how to output menus of different styles, including
multi-level menus, breadcrumbs, language menus, and sitemaps in the chapter
about the [menu data processor](https://docs.typo3.org/permalink/t3tsref:menuprocessor@main).

> [!NOTE]
> Before data processors were introduced it was common to use the TypoScript
> object [HMENU](https://docs.typo3.org/permalink/t3tsref:cobj-hmenu@main) to render a menu. It is still
> possible doing so and you might see it in older examples.
