hard coded autonav, missing nested lists

Permalink
I have two parts of a hard coated autonav.
It works well but the subpages dosen’t wrap in an own (nested) list (ul)

This is what I have:
<?php
// work pages (1st subdirectory in the 2nd. level)
$bt = BlockType::getByHandle('autonav');
$bt->controller->displayPages = 'second_level';
$bt->controller->orderBy = 'display_asc';                    
$bt->controller->displaySubPages = 'relevant'; 
$bt->controller->displaySubPageLevels = 'custom';
$bt->controller->displaySubPageLevelsNum = '1';                   
$bt->render('templates/header_menu');
// content pages (2nd subdirectory in the 2nd. level)
$bt = BlockType::getByHandle('autonav');
$bt->controller->displayPages = 'custom';
$bt->controller->displayPagesCID ="132";
$bt->controller->orderBy = 'display_asc';                    
$bt->controller->displaySubPages = 'all';


can anyone help me?
thanks in advance!

 
adajad replied on at Permalink Best Answer Reply
adajad
if you are using the core header_menu template the content of that file is:
<?php  defined('C5_EXECUTE') or die("Access Denied.");
$navItems = $controller->getNavItems();
?>
<ul class="nav-header">
<?php  foreach ($navItems as $ni) {
   $classes = array();
   if ($ni->isCurrent) {
      $classes[] = 'nav-selected';
   }
   if ($ni->inPath) {
      $classes[] = 'nav-path-selected';
   }
   if ($ni->isFirst) {
      $classes[] = 'first';
   }

As you can see no nesting is done in that file. What you should do is create your own template with the core view.php as a reference (really well commented file).

You will find that file in 'root/concrete/blocks/autonav'.
Custom templates info: http://www.concrete5.org/documentation/how-tos/designers/change-how...

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.