Unable to include navigation on site
Permalink
I have just loaded my site up and came to add Auto-Nav to my navigation area but was not offered input to add a block. Any ideas?
<nav>
<?php
$ga = new GlobalArea('Navigation');
$block_count = $ga->getTotalBlocksInArea($c);
if ($block_count > 0 || $c->isEditMode()) {
$ga = new GlobalArea('Navigation');
$ga->setBlockLimit(1);
$ga->display($c);
}
?>
</nav>
Just noticed that you have disabled the sub level pages in the code snipet. Is there some way I can over ride this to allow all levels to show?
$nav->controller->displaySubPages = 'none'; $nav->controller->displaySubPageLevels = 'custom'; $nav->controller->displaySubPageLevelsNum = 1;
Thank you.
Can you mark my answer as best answer. Thanks
If you try the following:
Or maybe hardcoding it into the template is an option?: