Skip to content

Commit d621e0f

Browse files
committed
Fabrice's comments
1 parent 607b515 commit d621e0f

File tree

1 file changed

+57
-64
lines changed

1 file changed

+57
-64
lines changed

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

Lines changed: 57 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -7,47 +7,40 @@ Dynamic plugin menu items:: Your preferences and your active plugins define dyna
77
Main menu items:: The core navigation structure of sidebar is static.
88

99
.Default static menu item configuration
10-
[source]
10+
[source,yaml]
1111
----
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
5144
----
5245

5346
.Procedure
@@ -100,13 +93,13 @@ dynamicPlugins:
10093
title: Favorites # <6>
10194
priority: 100 # <7>
10295
----
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.
110103

111104

112105
. 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:
128121
to: _<path_to_the_menu_target_page>_ # <9>
129122
priority: 100 # <10>
130123
----
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.
139132
// 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.
142135

143136
+
144137
.Example `mainItems` configuration
@@ -162,10 +155,10 @@ default.main-menu-items:
162155
icon: school # <6>
163156
to: /references # <7>
164157
----
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

Comments
 (0)