Hardcoding autonav block not displaying
PermalinkIf anyone has any ideas, I'd be grateful.
$navBT = BlockType::getByHandle('autonav'); $navBT->controller->displayPages = 'second_level'; $navBT->controller->orderBy = 'display_asc'; $navBT->controller->displaySubPages = 'all'; $navBT->controller->displaySubPageLevels = 'all'; $navBT->controller->render('view');

<div id="body"> <div id="middle"> <div id="contentwrapper"> <div id="content"> <?php print "test"; $navBT = BlockType::getByHandle('autonav'); $navBT->controller->displayPages = "second_level"; $navBT->controller->orderby = "display_asc"; $navBT->controller->displaySubPages = "all"; $navBT->controller->displaySubPageLevels = "all"; $navBT->render("view"); print "<h1>".$page->vObj->cvName."</h1>"; $a = new Area('Main'); $a->display($c);
It's possible I'm not seeing something obvious and just need a second pair of eyes.
<?php $autonav = BlockType :: getByHandle ( 'autonav' ); $autonav -> controller -> orderBy = 'display_asc'; $autonav -> controller -> displayPages = 'second_level'; $autonav -> controller -> displaySubPages = 'all'; $autonav -> controller -> displaySubPageLevels = 'custom'; $autonav -> controller -> displaySubPageLevelsNum = '2'; $autonav -> render ( 'view' ); ?>
If that still doesn't work, I would suggest:
• Do those pages have read permissions?
• Are those pages 'exclude_from_nav'?
• Are there any pages at the second level?