I have followed a couple tutorials on navigation/partials and am having issues with it displaying. I created a folder in the module for view/partial and have added a action to the controller (don't think i need this). So in my layout i call out this:
<?php echo $this->navigation('navigation')->breadcrumbs()->setMinDepth(0)->setPartial('partial/breadcrumb.phtml'); ?>
Then when i try to load the any page it comes up with this error:
Fatal error: Zend\View\Exception\RuntimeException: Zend\View\Renderer\PhpRenderer::render: Unable to render template "partial/breadcrumb.phtml"; resolver could not resolve to a file in /var/www/html/vendor/Zend/View/Helper/Navigation/AbstractHelper.php on line 170
Any help would be most appreciated thanks in advance.
Update: June 18 2017 9:20am EST
I have two pages that do not show breadcrumbs. I am thinking that it is because they have 'constraints'. I have put this in navigation but it does not seem to work. Does anyone know what the correct way to do this is?
array(
'label' => 'View',
'route' => 'blog/view[/:post_id]',
'action' => 'view',
),
array(
'label' => 'List',
'route' => 'blog/list[/:state_id]',
'action' => 'list',
),
Updated Monday June 19 2017 - added more navigation Navigation:
'navigation' => array(
'default' => array(
array(
'label' => 'Home',
'route' => 'home',
),
array(
'label' => 'Blog',
'route' => 'blog',
'pages' => array(
array(
'label' => 'Maps',
'route' => 'blog/maps',
'action' => 'maps',
),
array(
'label' => 'US Map',
'route' => 'blog/us-map',
'action' => 'UsMap',
),
array(
'label' => 'View',
'route' => 'blog/view[/:post_id]',
'action' => 'view',
),
array(
'label' => 'List',
'route' => 'blog/list[/:state_id]',
'action' => 'list',
),
),
),
),
),