Concrete 5.7.5.6 Auto Nav with Bootstrap

Permalink
Hi
This is my template file. Fully functional bootstrap menu with dropdown.
autonav/view.php

when You add new page with subpages check
child pages -> show all
site level -> show all

<?php defined('C5_EXECUTE') or die("Access Denied.");
$navItems = $controller->getNavItems();
$c = Page::getCurrentPage();
/**
 * The $navItems variable is an array of objects, each representing a nav menu item.
 * It is a "flattened" one-dimensional list of all nav items -- it is not hierarchical.
 * However, a nested nav menu can be constructed from this "flat" array by
 * looking at various properties of each item to determine its place in the hierarchy
 * (see below, for example $navItem->level, $navItem->subDepth, $navItem->hasSubmenu, etc.)
 *
 * Items in the array are ordered with the first top-level item first, followed by its sub-items, etc.
 *
 * Each nav item object contains the following information:
 *   $navItem->url        : URL to the page
 *   $navItem->name       : page title (already escaped for html output)