---
title: NavBar Menu
slug: navbar-menu
createdAt: 2025-12-08T00:18:50.909Z
---

The application bar now supports an optional user menu that appears when clicking the user avatar. Previously, selecting the avatar opened the User Properties page directly. This enhancement allows environments to present richer navigation options, profile information, or conditional actions based on authentication method.

# Enabling the User Menu

To enable the app-bar user menu, two settings must be enabled.

### 1. Feature Flag

**PR40023\_AddingConfigurableNavBarUserMenu**
&#x20;This product feature flag must be enabled before any configuration settings will take effect.

If this flag is not enabled, the user menu will not appear regardless of configuration.

### 2. Web Configuration Setting

Located in **Resources > Configuration > Web**:

**EnableNavBarUserMenu**
&#x20;*Type:* Boolean
&#x20;*Description:* When set to true, clicking the avatar opens a drop-down menu. When set to false, the avatar continues to open the User Properties page directly.

This feature is optional and disabled by default to preserve legacy behaviour during upgrades.

# Configuring User Menu Items

Menu items are defined in **Resources > Configuration > Web > NavBarUserMenuItems**.
&#x20;This parameter stores a JSON structure that determines:

- Which items appear in the menu&#x20;
- Their labels, icons, and navigation targets&#x20;
- Dynamic behaviour based on expression rules&#x20;

Example configuration:

:::BlockQuote
\{
&#x20; "menuItems": \[
&#x20;   \{
&#x20;     "type": "link",
&#x20;     "label": "=//CurrentUser/Name",
&#x20;     "labelDescription": "=//CurrentUser/Title",
&#x20;     "path": "/users/me",
&#x20;     "icon": "=//CurrentUser/ImageUrl",
&#x20;     "enabled": "true"
&#x20;   },
&#x20;   \{
&#x20;     "type": "link",
&#x20;     "label": "Logout",
&#x20;     "path": "/webapi/users/logout",
&#x20;     "icon": "logout md",
&#x20;     "enabled": "=/CanLogout"
&#x20;   }
&#x20; ]
}
:::

# Default Menu Item Behaviour

### User Profile Item

Displays the current user’s name, title, and avatar, and links to **/users/me**.
&#x20;Expression bindings (e.g. =//CurrentUser/Name) allow dynamic rendering based on the signed-in user.

### Logout Item

Visibility is controlled by the **=/CanLogout** expression.
&#x20;This ensures the option only appears where logout is appropriate.

In SSO environments, users may not log in or out directly. When CanLogout evaluates to false, the Logout item is automatically hidden.

# Customising Menu Items

Additional menu items can be added by extending the menuItems array. Supported configuration fields include:

| Property         | Description                                   |
| ---------------- | --------------------------------------------- |
| type             | Type of item (typically "link").              |
| label            | Text label or expression.                     |
| labelDescription | Optional secondary text.                      |
| path             | Navigation path or API endpoint.              |
| icon             | Icon name or expression.                      |
| enabled          | Boolean or expression controlling visibility. |

Expressions can reference user attributes, permissions, or system values, enabling contextual menu behaviour.
