Apex Reference Guide
Newer Version Available
NavigationMenu Class
Namespace
NavigationMenu Methods
-
getCommunityNavigationMenu(communityId, navigationLinkSetId, navigationLinkSetDeveloperName, publishStatus, includeImageUrl, addHomeMenuItem, menuItemTypesToSkip)
Get navigation menu items for an Experience Cloud site. -
getCommunityNavigationMenu(communityId, navigationLinkSetId, navigationLinkSetDeveloperName, publishStatus, includeImageUrl, addHomeMenuItem, menuItemTypesToSkip, effectiveAccountId)
Get navigation menu items for an Experience Cloud based on an effective account.
getCommunityNavigationMenu(communityId, navigationLinkSetId, navigationLinkSetDeveloperName, publishStatus, includeImageUrl, addHomeMenuItem, menuItemTypesToSkip)
API Version
52.0
Available to Guest Users
52.0
Requires Chatter
No
Signature
public static ConnectApi.NavigationMenuItemCollection getCommunityNavigationMenu(String communityId, String navigationLinkSetId, String navigationLinkSetDeveloperName, ConnectApi.PublishStatus publishStatus, Boolean includeImageUrl, Boolean addHomeMenuItem, List<ConnectApi.NavigationMenuItemType> menuItemTypesToSkip)
Parameters
- communityId
- Type: String
- ID of an Experience Cloud site.
- navigationLinkSetId
- Type: String
- ID of the navigation link set.
- navigationLinkSetDeveloperName
- Type: String
- Developer name of the navigation link set.
- publishStatus
- Type: ConnectApi.PublishStatus
- Publish status of the navigation menu item. Values
are:
- Draft
- Live
- includeImageUrl
- Type: Boolean
- Specifies whether to include the image URL with
the menu item (true) or not (false).
Data Source menu item types with a Storefront Categories data source aren’t supported when includeImageUrl is true.
- addHomeMenuItem
- Type: Boolean
- Specifies whether to add the Home menu item (true) or not (false).
- menuItemTypesToSkip
- Type: List<ConnectApi.NavigationMenuItemType>
- List of menu item types to filter out of the
results. Values are:
- Event—Event, such as logging in, logging out, or switching accounts.
- ExternalLink—URL outside of your site.
- GlobalAction—Lets users create records that aren’t related to other records.
- InternalLink—Relative URL inside your site.
- MenuLabel—Menu label.
- NavigationalTopic—Dropdown list with links to the navigational topics in your site.
- SalesforceObject—Objects such as accounts, cases, contacts, and custom objects.
- SystemLink—System link, such as a link to Builder, Workspaces, or Setup.
Return Value
Usage
- Event—Event, such as logging in, logging out, or switching accounts.
- ExternalLink—URL outside of your site.
- GlobalAction—Lets users create records that aren’t related to other records.
- InternalLink—Relative URL inside your site.
- MenuLabel—Menu label.
- NavigationalTopic—Dropdown list with links to the navigational topics in your site.
- SalesforceObject—Objects such as accounts, cases, contacts, and custom objects.
- SystemLink—System link, such as a link to Builder, Workspaces, or Setup.
getCommunityNavigationMenu(communityId, navigationLinkSetId, navigationLinkSetDeveloperName, publishStatus, includeImageUrl, addHomeMenuItem, menuItemTypesToSkip, effectiveAccountId)
API Version
54.0
Available to Guest Users
54.0
Requires Chatter
No
Signature
public static ConnectApi.NavigationMenuItemCollection getCommunityNavigationMenu(String communityId, String navigationLinkSetId, String navigationLinkSetDeveloperName, ConnectApi.PublishStatus publishStatus, Boolean includeImageUrl, Boolean addHomeMenuItem, List<ConnectApi.NavigationMenuItemType> menuItemTypesToSkip, String effectiveAccountId)
Parameters
- communityId
- Type: String
- ID of an Experience Cloud site.
- navigationLinkSetId
- Type: String
- ID of the navigation link set.
- navigationLinkSetDeveloperName
- Type: String
- Developer name of the navigation link set.
- publishStatus
- Type: ConnectApi.PublishStatus
- Publish status of the navigation menu item. Values
are:
- Draft
- Live
- includeImageUrl
- Type: Boolean
- Specifies whether to include the image URL with
the menu item (true) or not (false).
Data Source menu item types with a Storefront Categories data source aren’t supported when includeImageUrl is true.
- addHomeMenuItem
- Type: Boolean
- Specifies whether to add the Home menu item (true) or not (false).
- menuItemTypesToSkip
- Type: List<ConnectApi.NavigationMenuItemType>
- List of menu item types to filter out of the
results. Values are:
- Event—Event, such as logging in, logging out, or switching accounts.
- ExternalLink—URL outside of your site.
- GlobalAction—Lets users create records that aren’t related to other records.
- InternalLink—Relative URL inside your site.
- MenuLabel—Menu label.
- NavigationalTopic—Dropdown list with links to the navigational topics in your site.
- SalesforceObject—Objects such as accounts, cases, contacts, and custom objects.
- SystemLink—System link, such as a link to Builder, Workspaces, or Setup.
- effectiveAccountId
- Type: String
- ID of the account for which the request is made. If unspecified, defaults to the account ID for the context user.
Return Value
Usage
- Event—Event, such as logging in, logging out, or switching accounts.
- ExternalLink—URL outside of your site.
- GlobalAction—Lets users create records that aren’t related to other records.
- InternalLink—Relative URL inside your site.
- MenuLabel—Menu label.
- NavigationalTopic—Dropdown list with links to the navigational topics in your site.
- SalesforceObject—Objects such as accounts, cases, contacts, and custom objects.
- SystemLink—System link, such as a link to Builder, Workspaces, or Setup.