---
schema_version: "1"
id: 390f8569711d1261928dbde2e3a6ec5effcec6ea92a4d192349375fe40ad5b2c
title: NavigationMenu
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_navigationmenu.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_navigationmenu.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7b47ddaa9b05e7ce4d2bfb3d4fe822c0e4a5cb41f7aa2afe1ca2135fb8969c88
description: Represents the navigation menu in an Experience Builder site. A navigation menu consists of items that users can click to go to other parts of the site. This type replaces the NavigationLinkSet subtype on Network. NavigationMenu is available in API version 47.0 and later. This type extends the Metadata metadata type and inherits its fullName field.
---
# NavigationMenu

Represents the navigation menu in an Experience Builder site. A navigation menu consists of items that users can click to go to other parts of the site. This type replaces the NavigationLinkSet subtype on Network. NavigationMenu is available in API version 47.0 and later. This type extends the Metadata metadata type and inherits its fullName field.

The Help Center and LWR templates (Build Your Own and Microsites) don’t include generic record pages. So if you create an object or global action type menu item that links to a Salesforce object, make sure that you also create the corresponding object pages. If you don't create the associated object pages, end users won't see anything if they click on the menu item.

## File Suffix and Directory Location

NavigationMenu components have the suffix .navigationMenu and are stored in the navigationMenus folder.

## Version

NavigationMenu components are available in API version 47.0 and later.

## Special Access Rules

The MultipleNavigationMenu permission is required.

## Fields

| Field | Field Type | Description |
| --- | --- | --- |
| container | string | The name of the navigation menu container. |
| containerType | string | The container type. The options are Network or CommunityTemplateDefinition. |
| label | string | The navigation menu label as it appears in the Experience Builder UI. |
| navigationMenuItem | [NavigationMenuItem](#navigationMenu_NavigationMenuItem)\[\] | A list of menu items in a NavigationMenu. Use this object to create, delete, or update menu items in your site’s navigation menu. |

## NavigationMenuItem

Represents a single menu item in the NavigationLinkSet subtype on Network (API version 37.0 to 46.0) or in the NavigationMenu type (API version 47.0 and later). Use this object to create, delete, or update menu items in your site’s navigation menu.

<table class="featureTable sort_table" summary="">



        <thead class="thead sorted" align="left">
          <tr>
            <th class="featureTableHeader  " id="d689383e195">Field</th>

            <th class="featureTableHeader  " id="d689383e198">Field Type</th>

            <th class="featureTableHeader  " id="d689383e201">Description</th>

          </tr>

        </thead>

        <tbody class="tbody">
          <tr>
            <td class="entry" headers="d689383e195" data-title="Field"><span class="keyword parmname">defaultListViewId</span></td>

            <td class="entry" headers="d689383e198" data-title="Field Type">string</td>

            <td class="entry" headers="d689383e201" data-title="Description">If the value of the <span class="keyword parmname">type</span> field is <samp class="codeph nolang">SalesforceObject</samp>, the value is the ID of the default
              list view for the object.</td>

          </tr>

          <tr>
            <td class="entry" headers="d689383e195" data-title="Field"><span class="keyword parmname">label</span></td>

            <td class="entry" headers="d689383e198" data-title="Field Type">string</td>

            <td class="entry" headers="d689383e201" data-title="Description">Required. The text that appears in the navigation menu for this item.</td>

          </tr>

          <tr>
            <td class="entry" headers="d689383e195" data-title="Field"><span class="keyword parmname">menuItemBranding</span></td>

            <td class="entry" headers="d689383e198" data-title="Field Type"><a class="xref" href="#NavigationMenuItemBranding">NavigationMenuItemBranding</a></td>

            <td class="entry" headers="d689383e201" data-title="Description">Branding for the navigation menu item. Available in API version 47.0 and
              later.</td>

          </tr>

          <tr>
            <td class="entry" headers="d689383e195" data-title="Field"><span class="keyword parmname">position</span></td>

            <td class="entry" headers="d689383e198" data-title="Field Type">int</td>

            <td class="entry" headers="d689383e201" data-title="Description">Required. The location of the menu item in the navigation menu.</td>

          </tr>

          <tr>
            <td class="entry" headers="d689383e195" data-title="Field"><span class="keyword parmname">publiclyAvailable</span></td>

            <td class="entry" headers="d689383e198" data-title="Field Type">boolean</td>

            <td class="entry" headers="d689383e201" data-title="Description">When set to <samp class="codeph nolang">true</samp>, gives access to guest
              users.</td>

          </tr>

          <tr>
            <td class="entry" headers="d689383e195" data-title="Field"><span class="keyword parmname">subMenu</span></td>

            <td class="entry" headers="d689383e198" data-title="Field Type"><a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_network.htm#navigation_sub_menu">NavigationSubMenu</a></td>

            <td class="entry" headers="d689383e201" data-title="Description">A list of child menu items. This field is available in API 39.0 and
              later.</td>

          </tr>

          <tr>
            <td class="entry" headers="d689383e195" data-title="Field"><span class="keyword parmname">target</span></td>

            <td class="entry" headers="d689383e198" data-title="Field Type">string</td>

            <td class="entry" headers="d689383e201" data-title="Description">Required if <span class="keyword parmname">type</span> is <samp class="codeph nolang">ExternalLink</samp>, <samp class="codeph nolang">InternalLink</samp>, or
              <samp class="codeph nolang">SalesforceObject</samp>. If <span class="keyword parmname">type</span>
              is <samp class="codeph nolang">ExternalLink</samp> or <samp class="codeph nolang">InternalLink</samp>, the target is the URL that the link points to. For <samp class="codeph nolang">ExternalLink</samp>, your entry looks like this:
              <kbd class="ph userinput">https://salesforce.com</kbd>. For <samp class="codeph nolang">InternalLink</samp>, use a relative URL, such as
              <kbd class="ph userinput">/contactsupport</kbd>. If <span class="keyword parmname">type</span> is <samp class="codeph nolang">MenuLabel</samp> or <samp class="codeph nolang">NavigationalTopic</samp>, <span class="keyword parmname">target</span> isn’t used.
            </td>

          </tr>

          <tr>
            <td class="entry" headers="d689383e195" data-title="Field"><span class="keyword parmname">targetPreference</span></td>

            <td class="entry" headers="d689383e198" data-title="Field Type">string</td>

            <td class="entry" headers="d689383e201" data-title="Description">Backed by a picklist that includes preferences for the target field. Valid values are:<ul class="ul bulletList">
                <li class="li"><samp class="codeph nolang">None</samp></li>

                <li class="li">
                  <samp class="codeph nolang">OpenInExternalTab</samp>—Used for external links
                  to determine whether to open in an external tab.
                </li>

              </ul>
            </td>

          </tr>

          <tr>
            <td class="entry" headers="d689383e195" data-title="Field"><span class="keyword parmname">type</span></td>

            <td class="entry" headers="d689383e198" data-title="Field Type">string</td>

            <td class="entry" headers="d689383e201" data-title="Description">Required. The type of navigation menu item. Valid values are:<ul class="ul bulletList">
                <li class="li">
                  <samp class="codeph nolang">SalesforceObject</samp>—Available objects include
                  accounts, cases, contacts, and custom objects.
                </li>

                <li class="li">
                  <samp class="codeph nolang">ExternalLink</samp>—Links to a URL outside of your
                  site. For example, <kbd class="ph userinput">https://salesforce.com</kbd>.
                </li>

                <li class="li">
                  <samp class="codeph nolang">InternalLink</samp>—Links to a relative URL inside
                  your site. For example, <kbd class="ph userinput">/contactsupport</kbd>.
                </li>

                <li class="li">
                  <samp class="codeph nolang">MenuLabel</samp>—A parent heading for your
                  navigation menu. See <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_network.htm#navigation_sub_menu">NavigationSubMenu</a> for how to nest items
                  underneath the menu label. This value is available in API 39.0 and later.
                </li>

                <li class="li">
                  <samp class="codeph nolang">NavigationalTopic</samp>—A dropdown list with
                  links to the navigational topics in your site.
                </li>

              </ul>
              <p class="p">You can’t nest other items of type <samp class="codeph nolang">MenuLabel</samp> or <samp class="codeph nolang">NavigationalTopic</samp>
                under <samp class="codeph nolang">MenuLabel</samp>.</p>
            </td>

          </tr>

        </tbody>

      </table>

## NavigationMenuItemBranding

Branding for a menu item.

| Field | Field Type | Description |
| --- | --- | --- |
| tileImage | string | Name of the ContentAsset to use for the navigation menu item. |

## NavigationSubMenu

A list of child menu items. Only NavigationMenuItem items of type MenuLabel can have items in a NavigationSubMenu. Available in API 39.0 and later.

| Field | Field Type | Description |
| --- | --- | --- |
| navigationMenuItem | [NavigationMenuItem](#navigationMenu_NavigationMenuItem)\[\] | A list of menu items in a NavigationSubMenu. Use navigationMenuItem to create, delete, or update child items under a parent heading. |

## Declarative Metadata Sample Definition

The following is an example of a NavigationMenu component.

<?xml version="1.0" encoding="UTF-8"?>
<NavigationMenu xmlns="http://soap.sforce.com/2006/04/metadata">
    <container>Service</container>
    <containerType>Network</containerType>
    <label>Test Navigation</label>
    <navigationMenuItem>
        <label>Accounts</label>
        <position>1</position>
        <publiclyAvailable>false</publiclyAvailable>
        <target>Account</target>
        <type>SalesforceObject</type>
    </navigationMenuItem>
    <navigationMenuItem>
        <label>External Link</label>
        <menuItemBranding>
            <tileImage>google\_image</tileImage> 
        </menuItemBranding>
        <position>2</position>
        <publiclyAvailable>false</publiclyAvailable>
        <target>http://google.com</target>
        <targetPreference>OpenExternalLinkInSameTab</targetPreference>
        <type>ExternalLink</type>
    </navigationMenuItem>
    <navigationMenuItem>
        <label>All Objects</label>
        <position>3</position>
        <publiclyAvailable>false</publiclyAvailable>
        <subMenu>
            <navigationMenuItem>
                <label>Leads</label>
                <position>0</position>
                <publiclyAvailable>false</publiclyAvailable>
                <target>Account</target>
                <type>SalesforceObject</type>
            </navigationMenuItem>
        </subMenu>
        <type>MenuLabel</type>
    </navigationMenuItem>
</NavigationMenu>

The following is an example package.xml that references the previous definition.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
  <types>
    <members>\*</members>
    <name>NavigationMenu</name>
  </types>
  <version>47.0</version>
</Package>

## Wildcard Support in the Manifest File

This metadata type supports the wildcard character \* (asterisk) in the package.xml manifest file. For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).