Edit in GitHubLog an issue

Interface: TopbarApi

Defines page-level APIs available to solutions.

Hierarchy#

Index#

Properties#

Methods#

Properties#

customEnvLabel#

customEnvLabel: string

Inherited from TopbarApiProperties.customEnvLabel

Gets or sets a custom environment label in the shell.

Example:

Copied to your clipboard
topbar.customEnvLabel = 'Beta';

solution#

solution: Solution

Inherited from TopbarApiProperties.solution

Configuration for solution name and hero.

Example:

Copied to your clipboard
1topbar.solution = {
2 icon: 'AdobeExperienceCloud',
3 title: 'Adobe Experience Cloud22',
4 shortTitle: 'AEC'
5};

workspaces#

workspaces: WorkspaceMenu[]

Inherited from TopbarApiProperties.workspaces

Configuration for the Shell workspaces. Workspace names should be unique, and should be localized using the unified shell locale prior to setting runtime.workspaces.

Copied to your clipboard
1topbar.workspaces = [
2 {name: 'Home', url: '/'},
3 {name: 'ABC', url: '/abc'},
4 {name: 'DEF', url: '/def'}
5];

Unified shell also supports workspace flyout menus, where clicking on a workspace displays a dropdown menu. The top-level workspace is present in the dropdown menu as the first menu item. Menus may be nested multiple times, and used in combination with normal workspaces. By default, parent menu items will be automatically added to the sub-menu due to how the user interaction works. To prevent this functionality, simply remove the url property on the parent item and it will not be injected into the sub-menu.

Copied to your clipboard
1topbar.workspaces = [
2 {name: 'Home', url: '/'},
3 {name: 'ABC', url: '/abc'},
4 {
5 name: 'DEF',
6 url: '/def',
7 menu: [
8 {
9 name: 'GHI',
10 url: '/def/ghi',
11 menu: [
12 {name: 'JKL', url: '/def/ghi/jkl'}
13 ]
14 }
15 ]
16 }
17];

Methods#

onHeroClick#

onHeroClick(callback: Callback): void

Registers a callback to execute when the hero (solution) icon in the upper lefthand corner of the Shell is clicked.

Parameters:

NameTypeDescription
callbackCallbackThe callback to execute.

Returns: void


setCustomSearch#

setCustomSearch(config: CustomSearchConfig | null): void

Determines whether or not to enable the custom search property and enacts a callback when the custom search icon is clicked.

Parameters:

NameType
configCustomSearchConfig | null

Returns: void


setFeedbackButton#

setFeedbackButton(config: CustomFeedbackConfig | HelpCenterFeedbackConfig | ExternalFeedbackConfig | null): void

Determines whether or not to enable a feedback button.

Parameters:

NameType
configCustomFeedbackConfig | HelpCenterFeedbackConfig | ExternalFeedbackConfig | null

Returns: void

  • Privacy
  • Terms of Use
  • Do not sell my personal information
  • AdChoices
Copyright © 2022 Adobe. All rights reserved.