Navigation Menu


👨💻The Navigation Menu component in Activator serves as a crucial element for organizing and accessing different modules. It provides users with a structured interface to navigate through various features and functions of the system efficiently. This component not only enhances the user experience by making navigation intuitive but also allows developers to customize and configure the menu to align with specific organizational needs.

 

Navigation Menu On Activator Client

In Activator, navigation menu creation is done through Activator Admin, where users can design and configure menus according to their specific needs. Once the menus are created and customized in Activator Admin, the rendering of these menus can be directly viewed in Activator Client.

Viewing (based on your roles and privileges) on Activator Client, the Navigation Menus created from Activator Admin is done by clicking on the Change Modules button, and a popup containing the different navigation menus will open, as shown in the following two images.

Activator Client - Change Menu Button
Change Menu Button On Activator Client

 

Activator Client - Navigation Menus Popup.p
Activator Client Change Menu Popup

✋IMPORTANT
•    (1)The 🏠Home menu is the default menu provided by the system; it allows users to navigate back to the home page of Activator Client.
•   (2) List of menus related to the various modules configured by the tenant. Additionally, this list will also contain the different navigation menus of the modules included in the tenant's license.

 

Create A Navigation Menu

In Activator Admin , the Navigation Menu component is located within the menu container, among the items listed under </>Pages and Navigation. As shown at (1) on the image below.

✋CAUTION

Make sure you are in the System Component main module

 

Create Navigation Menu
Create A Navigation Menu

To initiate the creation of a Navigation Menu component, simply click on the +Add new button (illustrated at (2) on the image above). Upon clicking, you’ll observe a form (illustrated at (3) on the image above) appearing on the right side with some fields.

🔬After filling in the name and description fields, let's focus on the Definition and Meta Data fields.

The Meta Data field gathers and provides additional information for the component, such as configuration and parameters, as well as the accessibility and security measures associated with this component. Please refer to Meta Data for the complete list of additional information related to this component.

As for the Definition field, let's take a closer look at its JSON content. Notice that it's here where you will be prompted to fill in various fields. These fields will be used to specify information relating to the identification of the Navigation Menu and its Menu Sections.

{
    "title": "Menu",
    "index": 1000,
    "description": "Navigation Menu",
    "resourceName": "",
    "titleResKey": "",
    "descResKey": "",
    "sections": [],
    "accessControl": {
        "showFor": {
            "roles": [
                "sys.everyone"
            ]
        },
        "hideFor": {
            "roles": []
        }
    }
}

 

PROPERTY REQUIREDDEFAULT VALUEDESCRIPTION
titleYesMenuMenu title.
indexYes1000This defines the display order of the Navigation Menus, from left to right, in ascending order.
descriptionNoNavigation MenuMenu description.
resourceNameNo""Represents the associated language resource.
titleResKeyNo""Resource language key of the title.
descResKeyNo""Resource language key for the description.
sectionsNo[]

Allows grouping a set of Navigation Menu Sections.
Adding menu sections to a menu is done by adding a JSON object with two properties: name and index.
- name: Represents the name of the section menu to be assigned.
- index: This defines the display order of the Menu Section, from top to bottom, in ascending order.

Example: 

"sections": [
    {
        "index": 1,
        "name": "activatord.navigationmenusections.DocSection"
    },
    {
        "index": 2,
        "name": "activatord.navigationmenusections.DocSection2"
    }
]
accessControlNo
{
    "showFor": {
        "roles": [
            "sys.everyone"
        ]
    },
    "hideFor": {
        "roles": []
    }
}

This allows configuring the security aspect regarding the visibility of a Navigation Menu on Activator Client. This object contains 2 properties:
  *) showFor specifies the roles (in the roles property in the left cell) and the roleFilters for which the element should be displayed.
  *) hideFor specifies the roles (in the roles property in the left cell) and the roleFilters for which the element should not be displayed.

⚠️Exception: The value sys.everyone in the roles table (of the showFor property in the left table) allows applying this condition to all users of the tenant.

📒NOTE: For restrictions on attribute values for certain roles, the roleFilter property must be used on the same level as roles.
Example:

{
    "showFor": {
        "roles": [],
        "roleFilters": [
            {
                "roleName": "activatord.roles.headOfService",
                "attributeValues": [
                    {
                        "attributeName": "department",
                        "value": "ui"
                    }
                ]
            }
        ]
    },
    "hideFor": {
        "roles": ["activatord.roles.seller"]
    }
}

 

Conclusion

Navigation Menu component in Activator serves for organizing and accessing the various modules within the system. and ensures that users can easily navigate through different functionalities based on their roles and privileges, making the user experience more streamlined and efficient. With a clear understanding of the Navigation Menu, let's now explore the Navigation Menu Section, which further enhances the modular organization and accessibility of the application