Hardcode Autonav Question
Permalink
I need to hardcode my autonav into my template because the items that are displayed is dependent on which section of the site the user is views (Residential or Commercial)
How can I tell the controller to display pages underneath the Residential or Commercial page? I know how to check which section of the site the user is on, but I'm not sure how to tell the autonav controller which pages to display.
This is the code I've used in the past, and I assume I need to alter the displayPages property...but I don't know what to put there.
How can I tell the controller to display pages underneath the Residential or Commercial page? I know how to check which section of the site the user is on, but I'm not sure how to tell the autonav controller which pages to display.
This is the code I've used in the past, and I assume I need to alter the displayPages property...but I don't know what to put there.
$navBT = BlockType::getByHandle('autonav'); $navBT->controller->displayPages = 'below'; $navBT->controller->orderBy = 'display_asc'; $navBT->controller->displaySubPages = 'none'; $navBT->controller->displaySubPageLevels = 'all'; $navBT->render('view');