File tree 1 file changed +6
-2
lines changed
classes/output/navigation
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -107,8 +107,12 @@ public function export_for_template(?renderer_base $output = null): array {
107
107
// Separate the menus for the bottom menu.
108
108
$ locationbottom = smartmenu::get_menus_forlocation (smartmenu::LOCATION_BOTTOM , $ smartmenus );
109
109
110
- // Merge the smart menu nodes which contain the main menu location with the primary and custom menu nodes.
111
- $ menudata = array_merge ($ this ->get_primary_nav (), $ this ->get_custom_menu ($ output ), $ mainmenu );
110
+ // Merge the smart menu nodes which contain the main menu location with the custom menu nodes.
111
+ $ custommenus = array_merge ($ this ->get_custom_menu ($ output ), $ mainmenu );
112
+
113
+ // Merge the smart menu and custom menu nodes which contain the main menu location with the primary nodes.
114
+ // The function merge_primary_and_custom is needed cause it also sets the active node.
115
+ $ menudata = $ this ->merge_primary_and_custom ($ this ->get_primary_nav (), $ custommenus , false );
112
116
$ moremenu = new \core \navigation \output \more_menu ((object ) $ menudata , 'navbar-nav ' , false );
113
117
114
118
// Menubar.
You can’t perform that action at this time.
0 commit comments