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
+57-64Lines changed: 57 additions & 64 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,47 +7,40 @@ Dynamic plugin menu items:: Your preferences and your active plugins define dyna
7
7
Main menu items:: The core navigation structure of sidebar is static.
8
8
9
9
.Default static menu item configuration
10
-
[source]
10
+
[source,yaml]
11
11
----
12
-
export const DefaultMainMenuItems = {
13
-
menuItems: {
14
-
'default.home': {
15
-
title: 'Home',
16
-
icon: 'home',
17
-
to: '/',
18
-
priority: 100,
19
-
},
20
-
'default.my-group': {
21
-
title: 'My Group',
22
-
icon: 'group',
23
-
priority: 90,
24
-
},
25
-
'default.catalog': {
26
-
title: 'Catalog',
27
-
icon: 'category',
28
-
to: 'catalog',
29
-
priority: 80,
30
-
},
31
-
'default.apis': {
32
-
title: 'APIs',
33
-
icon: 'extension',
34
-
to: 'api-docs',
35
-
priority: 70,
36
-
},
37
-
'default.learning-path': {
38
-
title: 'Learning Paths',
39
-
icon: 'school',
40
-
to: 'learning-paths',
41
-
priority: 60,
42
-
},
43
-
'default.create': {
44
-
title: 'Create...',
45
-
icon: 'add',
46
-
to: 'create',
47
-
priority: 50,
48
-
},
49
-
},
50
-
};
12
+
dynamicsPlugins:
13
+
frontend:
14
+
_<plugin_name>_:
15
+
menuItems:
16
+
default.home:
17
+
title: Home
18
+
icon: home
19
+
priority: 100
20
+
default.my-group:
21
+
title: My Group
22
+
icon: group
23
+
priority: 90
24
+
default.catalog:
25
+
title: Catalog
26
+
icon: category
27
+
to: catalog
28
+
priority: 80
29
+
default.apis:
30
+
title: APIs
31
+
icon: extension
32
+
to: api-docs
33
+
priority: 70
34
+
default.learning-path:
35
+
title: Learning Paths
36
+
icon: school,
37
+
to: learning-paths
38
+
priority: 60
39
+
default.create:
40
+
title: Create
41
+
icon: add
42
+
to: create
43
+
priority: 50
51
44
----
52
45
53
46
.Procedure
@@ -100,13 +93,13 @@ dynamicPlugins:
100
93
title: Favorites # <6>
101
94
priority: 100 # <7>
102
95
----
103
-
<1> `my-plugin`: Matches `path` in `dynamicRoutes`
104
-
<2> `priority`: Controls order of plugins under the parent menu item.
105
-
<3> `parent`: Nests this plugin under the `favorites` parent menu item.
106
-
<4> `favourites`: Configuration for the parent menu item.
107
-
<5> `icon`: Displays the `favorite` icon from the {product-very-short} system icons.
108
-
<6> `title`: Displays the title name for the parent menu item.
109
-
<7> `priority`: Order of the `favourites` menu item in the sidebar.
96
+
<1> `my-plugin`: Matches `path` in `dynamicRoutes`
97
+
<2> `priority`: Controls order of plugins under the parent menu item.
98
+
<3> `parent`: Nests this plugin under the `favorites` parent menu item.
99
+
<4> `favourites`: Configuration for the parent menu item.
100
+
<5> `icon`: Displays the `favorite` icon from the {product-very-short} system icons.
101
+
<6> `title`: Displays the title name for the parent menu item.
102
+
<7> `priority`: Order of the `favourites` menu item in the sidebar.
110
103
111
104
112
105
. To modify a main menu item or add a custom menu item, add a section to the `default.main-menu-items` > `menuItems` section in your `{my-app-config-file}` file. Use the `default.` prefix to identify the key as a main menu item.
@@ -128,17 +121,17 @@ dynamicPlugins:
128
121
to: _<path_to_the_menu_target_page>_ # <9>
129
122
priority: 100 # <10>
130
123
----
131
-
<1> `default._<menu_group_parent_item_name>_`: Enter the menu group parent item name to configure static main menu items.
132
-
<2> `icon`: Enter the menu icon. Required for parent menu items.
133
-
<3> `title`: Enter the menu group title. Required for parent menu items.
134
-
<4> `priority`: (Optional) Enter the order of this menu item within its menu level.
135
-
<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.
136
-
<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.
137
-
<7> `icon`: (Optional) Enter the menu icon if you do not want to use the default icon.
138
-
<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.
124
+
<1> `default._<menu_group_parent_item_name>_`: Enter the menu group parent item name to configure static main menu items.
125
+
<2> `icon`: Enter the menu icon. Required for parent menu items.
126
+
<3> `title`: Enter the menu group title. Required for parent menu items.
127
+
<4> `priority`: (Optional) Enter the order of this menu item within its menu level.
128
+
<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
+
<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
+
<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.
139
132
// Update <8> for release 1.6 as this option (currently a workaround) would be added as a functionality. RHIDP-6333.
140
-
<9> `to`: (Optional) Enter the path that the menu item navigates to. If it is not set, it defaults to the home page.
141
-
<10> `priority`: (Optional) Enter the order of this menu item within its menu level.
133
+
<9> `to`: (Optional) Enter the path that the menu item navigates to. If it is not set, it defaults to the home page.
134
+
<10> `priority`: (Optional) Enter the order of this menu item within its menu level.
142
135
143
136
+
144
137
.Example `mainItems` configuration
@@ -162,10 +155,10 @@ default.main-menu-items:
162
155
icon: school # <6>
163
156
to: /references # <7>
164
157
----
165
-
<1> `icon`: Specify if you want to change the icon default menu item for the catalog.
166
-
<2> `title`: Specify an empty string `" "` to hide the learning path from the default sidebar.
167
-
<3> `default.parentlist`: Introduces the parent menu item.
168
-
<4> `parent`: Nests home menu under the `default.parentlist` parent menu item.
169
-
<5> `title`: Specifies a name for `default.references`
170
-
<6> `icon`: Displays the `school` icon.
171
-
<7> `to`: Redirects `default.references` to the `/references` page.
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.
160
+
<3> `default.parentlist`: Introduces the parent menu item.
161
+
<4> `parent`: Nests home menu under the `default.parentlist` parent menu item.
162
+
<5> `title`: Specifies a name for `default.references`
163
+
<6> `icon`: Displays the `school` icon.
164
+
<7> `to`: Redirects `default.references` to the `/references` page.
0 commit comments