NavigationMenu defines a navigation menu for an Experience Builder site. It controls the menu's container, item labels and positions, destinations, guest visibility, images, and submenus.
This is a menu-level metadata asset. Its navigationMenuItem entries, branding, and submenu children are contained configuration, not separately deployable menu items. Menu-item visibility is also separate from access to the objects or records that the item links to.
Key Elements
| Element | What the Element Controls |
|---|---|
container |
Names the navigation menu's container. An unresolved site or container dependency can prevent deployment. |
containerType |
Identifies the container type. Documented values are Network and CommunityTemplateDefinition. |
navigationMenuItem |
Contains the menu's items. Item creation, updates, and deletion are configured within the menu definition. |
navigationMenuItem.type |
Required. Values are SalesforceObject, ExternalLink, InternalLink, MenuLabel, and NavigationalTopic. The value determines destination requirements and whether children are allowed. |
navigationMenuItem.target |
Required for SalesforceObject, ExternalLink, and InternalLink. Identifies an object, an external URL, or a site-relative URL, respectively. Not used by MenuLabel or NavigationalTopic. |
navigationMenuItem.defaultListViewId |
For SalesforceObject items, selects the object's default list view by record ID, not developer name. |
navigationMenuItem.position |
Required integer specifying the item's location in the menu. |
navigationMenuItem.publiclyAvailable |
When true, enables guest access to the menu item. It does not establish access to the destination's objects or records. |
navigationMenuItem.subMenu |
Contains child items under a MenuLabel. Children cannot have type MenuLabel or NavigationalTopic. |
navigationMenuItem.targetPreference |
Documented values are None and OpenInExternalTab. The latter requests an external tab for external links. The official example contains a conflicting value, described below. |
navigationMenuItem.menuItemBranding.tileImage |
Names the ContentAsset used as the item's image. This dependency is separate from the item's destination. |
Behavior and Constraints
The MultipleNavigationMenu permission is required. At menu level, label is the label shown in Experience Builder. Each menu item requires its own label, position, and type.
Guest visibility and destination access are different settings. Setting publiclyAvailable to true makes the item accessible to guests; it should not be interpreted as granting guest access to linked objects or records.
Destination requirements
-
SalesforceObject:targetidentifies an object, such asAccountor a custom object. It can referenceCustomObjectmetadata. -
ExternalLink:targetmust contain an external URL. -
InternalLink:targetmust contain a relative URL within the site, such as/contactsupport. -
MenuLabel: provides a parent heading and does not usetarget. -
NavigationalTopic: produces a dropdown of links to the site's navigational topics and does not usetarget.
Help Center and LWR templates, including Build Your Own and Microsites, do not include generic record pages. Object or global action menu links to Salesforce objects require corresponding object pages. Without those pages, users see nothing when they click the item, even when its destination is configured.
Submenu limits
Only an item with type=MenuLabel can have a subMenu. Its children are stored in subMenu.navigationMenuItem, but those children cannot have type MenuLabel or NavigationalTopic. Although the structure looks recursive, it does not permit arbitrarily deep heading hierarchies.
Deployment and Retrieval
NavigationMenu components use the .navigationMenu suffix and are stored in the navigationMenus folder. In package.xml, use the type name NavigationMenu. The type supports the wildcard member *.
Deploy the menu definition to create, update, or delete its contained items. Submenu children are likewise configured within the parent menu; do not treat the nested NavigationMenuItem structure as a separate menu-item metadata component.
Check both the container and destination dependencies. A SalesforceObject item can depend on object metadata, while a branded item can separately depend on a named ContentAsset. For defaultListViewId, a source-org record ID should not be assumed to identify the intended list view in the destination org.
A missing-Network error can be a downstream symptom of unresolved site configuration, even when the deployment includes Network. The clean scratch-org case below involved a failing SiteDotCom reference, rather than simply an omitted manifest member.
Translation migration may need separate handling from the menu definition. The localization workflow reported below concerns NavigationMenuItemLocalization, a runtime object that stores records, not a nested structure in NavigationMenu metadata. It does not establish that deploying the menu carries translated labels.
Relationships
The menu connects to its container, object destinations, and image assets. The recognized container connections below are useful for dependency analysis, but they do not expand the documented containerType values beyond Network and CommunityTemplateDefinition.
References
-
CommunityTemplateDefinition:container. -
CustomSite:container. -
ManagedTopics:container. -
Network:container. -
CustomObject:target, forSalesforceObjectitems. -
ContentAsset:tileImage, by asset name.
Documentation Inconsistencies
The documented valid values for targetPreference are None and OpenInExternalTab. However, the official declarative example uses OpenExternalLinkInSameTab, which is absent from that list. This is a documentation inconsistency, not confirmation that the example value is supported.
Reported Issues
-
A missing-Network menu error can point to an earlier site-resolution failure. In a 2021 clean scratch-org report,
NavigationMenudeployments failed to find the network even though it was included in the deployment. The accompanyingNetworkerror showed that itsSiteDotComreference could not be resolved. The reported resolution was to create the destination site with the source site's name and template, deploy the site metadata, and publish it. This was a workflow for that setup, not a universal requirement to precreate sites or split deployments. See the scratch-org deployment discussion. -
Translated labels may require a separate migration workflow. In a TileMenu translation-migration discussion, a 2022 answer suggested exporting and importing
NavigationMenuItemLocalizationrecords through Data Loader or equivalent tools. This was a suggestion about runtime localization records, not confirmation thatNavigationMenumetadata includes translations. See the localization migration answer.
Common Questions
Can I deploy a NavigationMenuItem separately?
Menu items are contained configuration within NavigationMenu, not separate deployable metadata components. Configure top-level items in navigationMenuItem and children in subMenu.navigationMenuItem.
Why does my NavigationMenu deployment say the Network is missing when it is included?
The error can follow a failure in the site's own configuration. In the reported scratch-org case, the network could not resolve its SiteDotCom reference, and the menu errors followed that failure.
Why does an object menu link show nothing in my Experience Cloud site?
Help Center and LWR templates do not include generic record pages. An object or global action menu link to a Salesforce object needs a corresponding object page; configuring the destination alone is insufficient.
Does deploying NavigationMenu include translated menu labels?
The reported localization workflow does not establish that it does. A community answer suggested migrating NavigationMenuItemLocalization records separately through Data Loader or an equivalent tool.
Does defaultListViewId accept a list view developer name?
No. It selects the default list view by record ID for a SalesforceObject item. Do not assume that a source-org ID identifies the intended list view in the destination org.