-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix: set active navigation node when smartmenus are enabled, resoves #620, #384 and #694. #706
base: main
Are you sure you want to change the base?
Conversation
…s with other primary navigation Fixed moodle-an-hochschulen#344 and moodle-an-hochschulen#620
… with associative arrays.
Something I am not completely happy with concerning the tests which is way I select the smartmenu top level menu items: There seems to be no way to set the data-key for the smartmenus. Maybe one should be auto-generated by the title/text. Or is there a smarter more robust solution concerning the tests? |
…olved thanks @wiebkemueller-hsh for linking these issues
The behat tests now fail for the newest MOODLE_404_STABLE, but I think the issue is not related with this PR. |
5696e9a
to
b9fa4ca
Compare
Another summer time theme_boost_union fix.
This targets at solving the issues #620, #384 and #694.
In the file
classes/output/navigation/primary.php
when smartmenus were enabled theparent:export_for_template
does not get called ( parent class iscore\navigation\output\primary
).Cause of the bug: The menu with the smartmenu nodes are just merged with the primary navigation and the custommenus via the PHP function
array_merge
.Fix: Now the smartmenus and the custommenus are merged via array_merge and later merged with the primary menu nodes via the function
merge_primary_and_custom
. This function checks for the active node, the same way it happens when smartmenus are disabled.Maybe this should also be adjusted when the variable
$mobileprimarynav
gets set, too.To-Do:
At reviewers:
There is still a bug when clicking on external static link in the smartmenu and using the browsers return function, that multiple nodes (the actual active one and the external one) are shown as active. But I don't have any idea how to fix this edge case.