You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/customizing-the-appearance/proc-customize-rhdh-sidebar-menuitems.adoc
+19-20Lines changed: 19 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,10 +3,9 @@
3
3
4
4
The sidebar menu in {product} consists of two main parts:
5
5
6
-
* *Main menu items*: These items are the static menu items that form the core navigation structure of sidebar. These menu items remain consistent and are predefined.
7
-
8
6
* *Dynamic plugin menu items*: These items are displayed beneath the main menu and can be customized based on the plugins installed. The main menu items section is dynamic and can change based on your preferences and installed plugins.
9
7
8
+
* *Main menu items*: These items are the static menu items that form the core navigation structure of sidebar. These menu items remain consistent and are predefined.
10
9
11
10
.Procedure
12
11
@@ -16,19 +15,19 @@ The sidebar menu in {product} consists of two main parts:
16
15
----
17
16
dynamicPlugins:
18
17
frontend:
19
-
<package_name>: # <1>
20
-
menuItems: # <2>
21
-
<menu_item_name>: # <3>
22
-
icon: # home | group | category | extension | school | _<your_icon>_ <4>
23
-
title: My Plugin Page # <5>
24
-
priority: 10 # <6>
25
-
parent: favorites # <7>
18
+
<package_name>: <1>
19
+
menuItems: <2>
20
+
<menu_item_name>: <3>
21
+
icon: # home | group | category | extension | school | _<your_icon>_ <4>
22
+
title: My Plugin Page <5>
23
+
priority: 10 <6>
24
+
parent: favorites <7>
26
25
----
27
26
<1> `_<package_name>_`: Specifies the name of the package that is the same as `scalprum.name` key in the `package.json` of the plugin.
28
27
<2> `menuItems`: (Optional) Allows you to configure plugin menu items in the main sidebar navigation.
29
28
<3> `_<menu_item_name>_`: Represents a unique name in the main sidebar navigation. It can denote either a standalone menu item or a parent menu item. If this attribute represents a plugin menu item, the name of the attribute must match with the corresponding path in `dynamicRoutes`. For example, if `dynamicRoutes` defines `path: /my-plugin`, then `menu_item_name` must be defined as `my-plugin`.
30
-
<4> `icon`: (Optional) Specifies the icon for the menu item. You can use default icons or extend the icon set with dynamic plugins. {product-short} also provides additional icons in its internal library, such as:
31
-
<5> `title`: (Optional) Specifies the title of the menu item. It can be removed if the title is already specified in the `dynamicRoutes` configuration under `menuItem.text`.
29
+
<4> `icon`: (Optional) Specifies the icon for the menu item. You can use default icons or extend the icon set with dynamic plugins. {product-short} also provides additional icons in its internal library.
30
+
<5> `title`: (Optional) Specifies the title of the menu item. Omit it when the title is already specified in the `dynamicRoutes` configuration under `menuItem.text`.
32
31
<6> `priority`: (Optional) Sets the order in which menu items appear in the sidebar. The default priority is 0, which places the item at the bottom of the list. A higher priority value places the item higher in the sidebar. You can define this attribute for each section.
33
32
<7> `parent`: (Optional) Specifies the parent menu item under which the current item is nested. If this attribute is used, the parent menu item must be defined elsewhere in the `menuItems` configuration of any enabled plugin. You can define this attribute for each section.
34
33
@@ -38,15 +37,15 @@ dynamicPlugins:
38
37
----
39
38
dynamicPlugins:
40
39
frontend:
41
-
default.main-menu-items: # <1>
40
+
default.main-menu-items: <1>
42
41
menuItems:
43
-
default.<menu_item_name>: # <2>
44
-
parent: my_menu_group # <3>
45
-
priority: 10 # <4>
46
-
default.<menu_group_parent_item_name>: # <4>
47
-
icon: my_menu_group_icon # <5>
48
-
title: my_menu_group_title # <6>
49
-
priority: 100 # <7>
42
+
default.<menu_item_name>: <2>
43
+
parent: my_menu_group <3>
44
+
priority: 10 <4>
45
+
default.<menu_group_parent_item_name>: <4>
46
+
icon: my_menu_group_icon <5>
47
+
title: my_menu_group_title <6>
48
+
priority: 100 <7>
50
49
----
51
50
<1> `default.main-menu-items`: Specifies the key for configuring static main menu items. The `default.` prefix identifies an item as a main menu item. You can add the `default.` prefix to both individual menu items or parent menu group configuration, such as `default.<menu_group_parent_item_name>` in the previous example.
52
51
<2> `default._<menu_item_name>_`: Specifies the key of the menu item configuration. `default.` prefix is required for a main menu item key.
@@ -55,7 +54,7 @@ dynamicPlugins:
55
54
<5> `icon`: Required for parent menu items It defines the icon for the menu group.
56
55
<6> `title`: Required for parent menu items. It defines the icon for the menu group.
57
56
<7> `priority`: (Optional) Specifies the order of the parent menu item in the sidebar.
58
-
57
+
+
59
58
[NOTE]
60
59
====
61
60
The default priority of main menu items determines their order in the sidebar. You can customize the order of the static main menu items by adjusting their priority values. Ensure that the priority and title of each item is clear to facilitate easy reordering.
0 commit comments