Global Bootstrap Navigation

Permalink
Hi everyone

I am currently concretizing a bootstrap theme for 5.7.4.2. - 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 .... ?
Any suggestions?

<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';

pixeljunkie
View Replies:
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi pixeljunkie,

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.
http://c5blog.jordanlev.com/blog/2012/04/hard-coded-autonav-options...
pixeljunkie replied on at Permalink Reply
pixeljunkie
Hi - thanks for your input.

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
replace_link_with_first_in_nav
- attribute to link to the first child page.