---
title: "HMENU"
manual: "TypoScript Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3tsref:cobj-hmenu@main"
source: "ContentObjects/Hmenu/Index.rst"
modified: "2026-09-15T06:04:04+00:00"
---

# HMENU

> [!WARNING]
> This TypoScript object is still available to provide backward compatibility
> for old sites. When creating a new menu or refactoring an existing one
> always use the [menu data processor](https://docs.typo3.org/permalink/t3tsref:menuprocessor@main)
> and a Fluid template.

Objects of type HMENU generate hierarchical menus. In a
[FLUIDTEMPLATE](https://docs.typo3.org/permalink/t3tsref:cobj-fluidtemplate@main) the HMENU can be used as
a DataProcessor called [MenuProcessor](https://docs.typo3.org/permalink/t3tsref:menuprocessor@main), which
internally uses the HMENU functionality.

The cObject HMENU allows you to define the global settings of the menu
as a whole. For the rendering of the single menu levels, different
[menu objects](https://docs.typo3.org/permalink/t3tsref:menu-objects@main) can be used.

Apart from creating a hierarchical menu of the pages as they are
structured in the page tree, HMENU also allows you to use the
[.special property](https://docs.typo3.org/permalink/t3tsref:hmenu-special-property@main) to create special
menus. These special menus take characteristics of special menu types
into account.

## Properties

**1, 2, 3, ...**

-   **1, 2, 3, ...**

    -   *Type:* [menu object](https://docs.typo3.org/permalink/t3tsref:data-type-menuobj@main)
    -   *Default:* (no menu)

    For every menu level, that should be rendered, an according entry must
    exist. It defines the menu object that should render the menu items on
    the according level. 1 is the first level, 2 is the second level, 3 is
    the third level and so on.

    **The property "1" is required!**

    The entry 1 for the first level always must exist. All other levels only
    will be generated when they are configured.

    TYPO3 offers [the menu object TMENU](https://docs.typo3.org/permalink/t3tsref:menu-objects@main).

**cache_period**

-   **cache_period**

    -   *Type:* [integer](https://docs.typo3.org/permalink/t3tsref:data-type-integer@main)

    The number of seconds a menu may remain in cache. If this value is not
    set, the first available value of the following will be used:

    1.  cache_timeout of the current page
    1.  config.cache_period defined globally
    1.  86400 (= 1 day)

**cache**

-   **cache**

    -   *Type:* [cache](https://docs.typo3.org/permalink/t3tsref:cache@main)

    See [cache function description](https://docs.typo3.org/permalink/t3tsref:cache@main) for details.

**entryLevel**

-   **entryLevel**

    -   *Type:* [integer](https://docs.typo3.org/permalink/t3tsref:data-type-integer@main) / [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)
    -   *Default:* 0

    Defines at which level in the rootLine the menu should start.

**special**

-   **special**

    -   *Type:* *"directory" / "list" / "updated" / "rootline" / "browse" / "keywords" / "categories" / "language" / "userfunction"*

    Lets you define special types of menus.

    See the section about the [.special property](https://docs.typo3.org/permalink/t3tsref:hmenu-special-property@main)!

**special.value**

-   **special.value**

    -   *Type:* *list of page-uid's* / [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)

    List of page uid's to use for the special menu. What they are used
    for depends on the menu type as defined by ".special"; see the
    section about the [.special property](https://docs.typo3.org/permalink/t3tsref:hmenu-special-property@main)!

**minItems**

-   **minItems**

    -   *Type:* [integer](https://docs.typo3.org/permalink/t3tsref:data-type-integer@main) / [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)

    The minimum number of items in the menu. If the number of pages does
    not reach this level, a dummy-page with the title "..." and
    `uid=[currentpage_id]` is inserted.

    **Note:** Affects all sub menus as well. To set the value for each
    menu level individually, set the properties in the menu objects (see
    "Common properties" table).

**maxItems**

-   **maxItems**

    -   *Type:* [integer](https://docs.typo3.org/permalink/t3tsref:data-type-integer@main) / [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)

    The maximum number of items in the menu. Additional items will be
    ignored.

    **Note:** Affects all sub menus as well. (See "minItems" for a
    notice.)

**begin**

-   **begin**

    -   *Type:* [integer](https://docs.typo3.org/permalink/t3tsref:data-type-integer@main) / [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main) [+calc](https://docs.typo3.org/permalink/t3tsref:objects-calc@main)

    The first item in the menu.

    **Note:** Affects all sub menus as well. (See "minItems" for a
    notice.)

**excludeUidList**

-   **excludeUidList**

    -   *Type:* list of [integer](https://docs.typo3.org/permalink/t3tsref:data-type-integer@main) / [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)

    See [excludeUidList](https://docs.typo3.org/permalink/t3tsref:confval-menuprocessor-excludeuidlist@main).

**excludeDoktypes**

-   **excludeDoktypes**

    -   *Type:* list of [integer](https://docs.typo3.org/permalink/t3tsref:data-type-integer@main)
    -   *Default:* 6,254

    See [excludeDoktypes](https://docs.typo3.org/permalink/t3tsref:confval-menuprocessor-excludedoktypes@main).

**includeNotInMenu**

-   **includeNotInMenu**

    -   *Type:* [boolean](https://docs.typo3.org/permalink/t3tsref:data-type-boolean@main) / [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)

    See [includeNotInMenu](https://docs.typo3.org/permalink/t3tsref:confval-menuprocessor-includenotinmenu@main)

**alwaysActivePIDlist**

-   **alwaysActivePIDlist**

    -   *Type:* list of [integer](https://docs.typo3.org/permalink/t3tsref:data-type-integer@main) /[stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)

    See [alwaysActivePIDlist](https://docs.typo3.org/permalink/t3tsref:confval-menuprocessor-alwaysactivepidlist@main)

**protectLvar**

-   **protectLvar**

    -   *Type:* [boolean](https://docs.typo3.org/permalink/t3tsref:data-type-boolean@main) / keyword

    See [protectLvar](https://docs.typo3.org/permalink/t3tsref:confval-menuprocessor-protectlvar@main).

**if**

-   **if**

    -   *Type:* [->if](https://docs.typo3.org/permalink/t3tsref:if@main)

    If "if" returns false, the menu is not generated.

**wrap**

-   **wrap**

    -   *Type:* [wrap](https://docs.typo3.org/permalink/t3tsref:data-type-wrap@main) / [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)

    Wrap for the HMENU.

**stdWrap**

-   **stdWrap**

    -   *Type:* [->stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)

    (Executed after ".wrap".)

For examples on how to use the HMENU please refer to old version of this
document, for example [HMENU](https://docs.typo3.org/m/typo3/reference-typoscript/11.5/en-us/ContentObjects/Hmenu/Index.html#cobj-hmenu)
