Global Bootstrap Navigation
I am currently concretizing a bootstrap theme for 18.104.22.168. - I have hardcoded the nav (because I don't want my customer to mess around with global areas) within the template. The code is below. Now I run into issues whenever a parent page has sub-pages: I would like parent to work as a "header" for the sub-pages without clickable page behind it.
I guess I will need to include a line of code .... ?
<div class="main-navigation animated"> <nav class="navbar navbar-default"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div class="collapse navbar-collapse" id="navbar-collapse-1"> <?php $nav = BlockType::getByHandle('autonav'); $nav->controller->orderBy = 'display_asc';
Instead of hard coding the Auto-Nav, have you considered leaving them in global areas and locking down the permissions?
Also, hard coded blocks are not cached. This could affect performance on a large site.
I have replaced the hardcoded version by a global area as sugested. Permissions did not work, the page needed redirection. I discovered that I had to generate an