Skip to content

Commit e0ac5ae

Browse files
openshift-cherrypick-robotjmagakGerry-Forde
authored
[release-1.6] RHIDP-6569-1 - Document the configurable features of navigation (sidebar) in RHDH (#1153)
Co-authored-by: Judith Magak <[email protected]> Co-authored-by: Gerry-Forde <[email protected]>
1 parent ac7eb9d commit e0ac5ae

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

modules/customizing-the-appearance/proc-configuring-dynamic-plugin-menuitem.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ dynamicPlugins:
1818
title: _<plugin_page_title>_ # <4>
1919
priority: 10 # <5>
2020
parent: favorites # <6>
21+
enabled: true # <7>
2122
----
2223
<1> `_<plugin_name>_`: Enter the plugin name. This name is the same as the `scalprum.name` key in the `package.json` file.
2324
<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`.
@@ -30,6 +31,7 @@ dynamicPlugins:
3031
// Update <4> for release 1.6 as this option (currently a workaround) would be added as a functionality. RHIDP-6333.
3132
<5> `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 field for each section.
3233
<6> `parent`: (Optional) Enter the parent menu item under which the current item is nested. If this field is used, the parent menu item must be defined elsewhere in the `menuItems` configuration of any enabled plugin. You can define this field for each section.
34+
<7> `enabled`: (Optional) If this field is used to hide the menu item from the sidebar, set the value to `false`. To display the menu item in the sidebar, set the value to `true`.
3335

3436
+
3537
.Example `menuItems` configuration

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,34 @@ dynamicPlugins:
1919
title: Home
2020
icon: home
2121
priority: 100
22+
enabled: true
2223
default.my-group:
2324
title: My Group
2425
icon: group
2526
priority: 90
27+
enabled: true
2628
default.catalog:
2729
title: Catalog
2830
icon: category
2931
to: catalog
3032
priority: 80
33+
enabled: true
3134
default.apis:
3235
title: APIs
3336
icon: extension
3437
to: api-docs
3538
priority: 70
39+
enabled: true
3640
default.learning-path:
3741
title: Learning Paths
3842
icon: school,
3943
to: learning-paths
4044
priority: 60
45+
enabled: true
4146
default.create:
4247
title: Self-service
4348
icon: add
4449
to: create
4550
priority: 50
51+
enabled: true
4652
----

modules/customizing-the-appearance/proc-modifying-or-adding-rhdh-custom-menuitem.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ dynamicPlugins:
2222
title: _<my_menu_title>_ # <8>
2323
to: _<path_to_the_menu_target_page>_ # <9>
2424
priority: 100 # <10>
25+
enabled: true # <11>
2526
----
2627
<1> `default._<menu_group_parent_item_name>_`: (Optional) Enter the menu group parent item name to configure static main menu items. If no `default._<menu_item_name>_` has a `parent` value set, this field is not needed.
2728
<2> `icon`: Enter the menu icon. Required for parent menu items.
@@ -34,6 +35,7 @@ dynamicPlugins:
3435
// Update <8> for release 1.6 as this option (currently a workaround) would be added as a functionality. RHIDP-6333.
3536
<9> `to`: (Optional) Enter the path that the menu item navigates to. If it is not set, it defaults to the home page.
3637
<10> `priority`: (Optional) Enter the order of this menu item within its menu level.
38+
<11> `enabled`: (Optional) If this field is used to display the menu item in the sidebar, set the value to `true`. To hide the menu item from the sidebar, set the value to `false`.
3739

3840
+
3941
.Example `mainItems` configuration
@@ -56,11 +58,13 @@ default.main-menu-items:
5658
title: References # <5>
5759
icon: school # <6>
5860
to: /references # <7>
61+
enabled: true # <8>
5962
----
6063
<1> `icon`: Specifies if you want to change the icon default menu item for the catalog.
6164
<2> `title`: Specifies an empty string `" "` to hide the learning path from the default sidebar.
6265
<3> `default.parentlist`: Introduces the parent menu item.
6366
<4> `parent`: Nests home menu under the `default.parentlist` parent menu item.
6467
<5> `title`: Specifies a name for `default.references`
6568
<6> `icon`: Displays the `school` icon.
66-
<7> `to`: Redirects `default.references` to the `/references` page.
69+
<7> `to`: Redirects `default.references` to the `/references` page.
70+
<8> `enabled`: (Optional) If this field is used to display the menu item in the sidebar, set the value to `true`. To hide the menu item from the sidebar, set the value to `false`.

0 commit comments

Comments
 (0)