Showing and Hiding the ContextHub UI
Configure the Adobe Granite ContextHub OSGi service to show or hide the ContextHub UI on your pages. The PID of this service is com.adobe.granite.contexthub.impl.ContextHubImpl.
To configure the service you can either use the Web Console or use a JCR node in the repository:
- Web Console: To show the UI, select the Show UI property. To hide the UI, clear the Hide UI property.
- JCR node: To show the UI, set the boolean
com.adobe.granite.contexthub.show_ui
property totrue
. To hide the UI, set the property tofalse
.
When showing the ContextHub UI, it only appears on pages on AEM author instances. The UI does not appear on pages of publish instances.
Adding ContextHub UI Modes and Modules
Configure the UI modes and modules that appear in the ContextHub toolbar in Preview mode:
- UI Modes: Groups of related modules
- Modules: Widgets that expose context data from a store and enable authors to manipulate the context
UI modes appear as a series of icons on the left side of the toolbar. When selected, the modules of a UI mode appear to the right.
Icons are references from the Coral UI icon library.
Adding a UI Mode
Add a UI mode to group related ContextHub modules. When you create the UI mode, you provide the title and icon that appear in the ContextHub toolbar.
-
On the Experience Manager rail, click or tap Tools > Sites > Context Hub.
-
Click or tap the default Configuration Container.
-
Click or tap the Context Hub Configuration.
-
Click or tap the Create button, and then click or tap Context Hub UI Mode.
-
Provide values for the following properties:
- UI Mode Title: The title that identifies the UI mode
- Mode Icon: The selector for the Coral UI icon to use, for example
coral-Icon--user
- Enabled: Select to show the UI mode in the ContextHub toolbar
-
Click or tap Save.