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
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ dynamicsPlugins:
45
45
46
46
.Procedure
47
47
48
-
. To configure a dynamic plugin menu item, add a `menuItems` section for your _<plugin_name>_ plugin to your `{my-app-config-file}` file:
48
+
. To configure a dynamic plugin menu item, update the `menuItems` section of your _<plugin_name>_ plugin to your `{my-app-config-file}` file. For example:
49
49
+
50
50
[source,yaml]
51
51
----
@@ -61,8 +61,9 @@ dynamicPlugins:
61
61
----
62
62
<1> `_<plugin_name>_`: Enter the plugin name. This name is the same as the `scalprum.name` key in the `package.json` file.
63
63
<2> `_<menu_item_name>_`: Enter a unique name in the main sidebar navigation for either a standalone menu item or a parent menu item. If this field specifies a plugin menu item, the name of the menu item must match the name using in the corresponding path in `dynamicRoutes`. For example, if `dynamicRoutes` defines `path: /my-plugin`, then `menu_item_name` must be defined as `my-plugin`.
64
-
<3> `icon`: (Optional) Enter the icon name if you do not want to use the default icon. You can use the following icons:
65
-
* Default icons, such as `home`, `group`, `category`, `extension`, and `school`
64
+
<3> `icon`: (Optional) Enter the icon name. You can use any of the following icons:
65
+
* Default icons, such as `home`, `group`, `category`, `extension`, and `school`. To use default icons, set the icon as an (`" "`) empty string.
66
+
* A custom icon, where _<my_icon>_ specifies the name of your custom icon
66
67
* An SVG icon, such as: `icon: <svg width="20px" height="20px" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" fill="#ffffff">...</svg>`
67
68
* An HTML image, such as: `icon: https://img.icons8.com/ios-glyphs/20/FFFFFF/shop.png`
68
69
<4> `title`: (Optional) Enter the menu item title. Omit it when the title is already specified in the `dynamicRoutes` configuration under `menuItem.text`. To hide the title from the sidebar, set the title as an (`" "`) empty string.
@@ -127,7 +128,7 @@ dynamicPlugins:
127
128
<4> `priority`: (Optional) Enter the order of this menu item within its menu level.
128
129
<5> `default._<menu_item_name>_`: Enter the menu item name for which you want to override the default value. Add the `default.` prefix to identify a main menu item.
129
130
<6> `parent`: (Optional) Enter the parent menu item for this item. Required if <menu_item_name> is specified as the child of any menu items.
130
-
<7> `icon`: (Optional) Enter the menu icon if you do not want to use the default icon.
131
+
<7> `icon`: (Optional) Enter the menu icon. To use the default icon, set the icon as an (`" "`) empty string.
131
132
<8> `title`: (Optional) Enter the menu group title. Only required for adding a new custom main menu item. To hide a default main menu item title from the sidebar, set the title as an (`" "`) empty string.
132
133
// Update <8> for release 1.6 as this option (currently a workaround) would be added as a functionality. RHIDP-6333.
133
134
<9> `to`: (Optional) Enter the path that the menu item navigates to. If it is not set, it defaults to the home page.
@@ -155,8 +156,8 @@ default.main-menu-items:
155
156
icon: school # <6>
156
157
to: /references # <7>
157
158
----
158
-
<1> `icon`: Specify if you want to change the icon default menu item for the catalog.
159
-
<2> `title`: Specify an empty string `" "` to hide the learning path from the default sidebar.
159
+
<1> `icon`: Specifies if you want to change the icon default menu item for the catalog.
160
+
<2> `title`: Specifies an empty string `" "` to hide the learning path from the default sidebar.
160
161
<3> `default.parentlist`: Introduces the parent menu item.
161
162
<4> `parent`: Nests home menu under the `default.parentlist` parent menu item.
162
163
<5> `title`: Specifies a name for `default.references`
0 commit comments