Breadcrumbs in template

Permalink 2 users found helpful
How would I get a pagelist block to display the breadcrumb template in my theme?

Would it start with something like this but with an extra controller? :
<?php
$bt = BlockType::getByHandle('autonav');
$bt->controller->orderBy = 'display_asc';                    
$bt->controller->displayPages = 'top';
$bt->controller->displaySubPages = 'all';     
$bt->controller->displaySubPageLevels = 'all';                    
$bt->render('view');
?>


Thanks for any help

Matt

MattGreyDesign
 
hursey013 replied on at Permalink Best Answer Reply
hursey013
There's a premade custom template for breadcrumbs already, just use something like this
$breadcrumbs = BlockType::getByHandle('autonav');
         $breadcrumbs->controller->displayPages = 'top';
         $breadcrumbs->controller->orderBy = 'display_asc';                    
         $breadcrumbs->controller->displaySubPages = 'relevant_breadcrumb';  
         $breadcrumbs->controller->displaySubPageLevels = 'all';
         $breadcrumbs->render('templates/breadcrumb');
MattGreyDesign replied on at Permalink Reply
MattGreyDesign
That's great, that was all I needed, I don't like the way the default breadcrumb works so I made my own, that's all