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:
JayWll 2020-05-16 15:14:47 -06:00
parent a92ee4dfac
commit 1c9de8f4b5

View File

@ -1,5 +1,13 @@
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">
<span class="navbar-toggler-icon"></span>
</button>