Autonav displayPagesCID = '92' not working when on page 92
PermalinkI'm trying to create a section sub nav using the following:
<?php $bt_main = BlockType::getByHandle('autonav'); $bt_main->controller->displayPages = 'custom'; $bt_main->controller->displayPagesCID = '92'; $bt_main->controller->orderBy = 'display_asc'; $bt_main->render('templates/sub_nav'); ?>
This works great when on the children of the parent but when viewing the parent page, I see the top level pages instead of the children of page 92.
Sorry of this is easy but just can't seem to work this out - any help would be much appreciated.
Cheers
Ben

Is my custom template code stuffing things up maybe?
<?php defined('C5_EXECUTE') or die("Access Denied."); $bt->controller->displayPages = 'current'; $aBlocks = $controller->generateNav(); $c = Page::getCurrentPage(); $nh = Loader::helper('navigation'); $isFirst = true; foreach($aBlocks as $ni) { $_c = $ni->getCollectionObject(); if (!$_c->getCollectionAttributeValue('exclude_nav')) { $target = $ni->getTarget(); if ($target != '') { $target = 'target="' . $target . '"'; } if ($ni->isActive($c) || strpos($c->getCollectionPath(), $_c->getCollectionPath()) === 0) {
If that's not something you're able to do, try searching around the forums for posts about which autonav variables are available and what each of them does -- I vaguely remember seeing something a while back where someone posted all of the various options and what they mean.
I think I'll do it from the front-end.
Cheers
Mate...