Restoring onStart() function to menu menu partial
Code determines which section of the site is current and applies the relevant classes to the menu items
This commit is contained in:
parent
a92ee4dfac
commit
1c9de8f4b5
@ -1,5 +1,13 @@
|
|||||||
description = "Main Site Menu"
|
description = "Main Site Menu"
|
||||||
==
|
==
|
||||||
|
<?php
|
||||||
|
function onStart()
|
||||||
|
{
|
||||||
|
// Determine the acive section of the site in order to customize the navigation
|
||||||
|
$this['activeSection'] = explode('/', $_SERVER['REQUEST_URI'])[1];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
==
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
|
Loading…
Reference in New Issue
Block a user