MDL-74002 admin: Change conditions for rendering nav tabs

This commit is contained in:
Mathew May 2022-03-02 19:29:47 +08:00
parent 9cd77c4130
commit 030ade06ff

View File

@ -89,8 +89,11 @@ if ($query && $hassiteconfig) {
if ($showsettingslinks) {
$node = $PAGE->settingsnav->find('root', navigation_node::TYPE_SITE_ADMIN);
if ($node) {
$moremenu = new \core\navigation\output\more_menu($PAGE->secondarynav, 'nav-tabs');
$secondarynavigation = $moremenu->export_for_template($OUTPUT);
$secondarynavigation = false;
if ($PAGE->has_secondary_navigation()) {
$moremenu = new \core\navigation\output\more_menu($PAGE->secondarynav, 'nav-tabs');
$secondarynavigation = $moremenu->export_for_template($OUTPUT);
}
echo $OUTPUT->render_from_template('core/settings_link_page',
['node' => $node, 'secondarynavigation' => $secondarynavigation]);
}