Hardcoded autonav that only shows navs with attributes
Permalink
Most navigation on my sites are built in the templates, but I don't know how to use this code to show all links from the site map that have a certain attribute; a checkbox named info_nav
I hoped a controller could be used above, but from searches I came up empty. I assume a custom template will have to be used, but have failed creating one that works. Does anyone have a good starting point or example?
Thanks!
<?php $bt = BlockType::getByHandle('autonav'); $bt->controller->displayPages = 'top'; $bt->controller->orderBy = 'display_asc'; $bt->controller->displaySubPages = 'relevant_breadcrumb'; $bt->controller->displaySubPageLevels = 'all'; $bt->render('templates/bootstrap_breadcrumbs'); ?>
I hoped a controller could be used above, but from searches I came up empty. I assume a custom template will have to be used, but have failed creating one that works. Does anyone have a good starting point or example?
Thanks!