Reference

Menu Settings

A MenuSettings object represents menu configuration from project config — limits, propagation, permissions, and field layouts — rather than field values saved on the menu. Templates rarely need this object; use the Menu element for custom field values.

Access

$menuSettings = \verbb\navigation\Navigation::$plugin->getMenus()->getMenuByHandle('mainMenu');

MenuSettings is a PHP-only API. In Twig, use craft.navigation.menu('handle').one() for menu field values.

Properties

id

Type: int|null

Menu ID

name

Type: string|null

Display name

handle

Type: string|null

Handle (used in Twig/GraphQL)

instructions

Type: string|null

CP instructions

maxLevels

Type: int|null

Maximum nesting depth

maxNodes

Type: int|null

Maximum total nodes

propagationMethod

Type: string

Multisite propagation for nodes

titleTranslationMethod

Type: string

How node titles propagate across sites (none, site, siteGroup, language, custom)

titleTranslationKeyFormat

Type: string|null

Custom translation key template when titleTranslationMethod is custom

defaultEnabledForPropagatedSites

Type: bool

Default Enabled On Other Sites By Default value for new nodes when propagation is not none

structureId

Type: int|null

Craft structure ID for the node tree

fieldLayoutId

Type: int|null

Node custom field layout

For menu-level field values, use craft.navigation.menu('handle').one().