Skip to content

Commit 005e8f9

Browse files
committed
Incorporated comments Fabrice's
1 parent b7d2bba commit 005e8f9

File tree

1 file changed

+19
-20
lines changed

1 file changed

+19
-20
lines changed

modules/customizing-the-appearance/proc-customize-rhdh-sidebar-menuitems.adoc

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33

44
The sidebar menu in {product} consists of two main parts:
55

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-
86
* *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.
97

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.
109

1110
.Procedure
1211

@@ -16,19 +15,19 @@ The sidebar menu in {product} consists of two main parts:
1615
----
1716
dynamicPlugins:
1817
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>
2625
----
2726
<1> `_<package_name>_`: Specifies the name of the package that is the same as `scalprum.name` key in the `package.json` of the plugin.
2827
<2> `menuItems`: (Optional) Allows you to configure plugin menu items in the main sidebar navigation.
2928
<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`.
3231
<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.
3332
<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.
3433

@@ -38,15 +37,15 @@ dynamicPlugins:
3837
----
3938
dynamicPlugins:
4039
frontend:
41-
default.main-menu-items: # <1>
40+
default.main-menu-items: <1>
4241
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>
5049
----
5150
<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.
5251
<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:
5554
<5> `icon`: Required for parent menu items It defines the icon for the menu group.
5655
<6> `title`: Required for parent menu items. It defines the icon for the menu group.
5756
<7> `priority`: (Optional) Specifies the order of the parent menu item in the sidebar.
58-
57+
+
5958
[NOTE]
6059
====
6160
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

Comments
 (0)