I am quite new to ZF, and I have got to follow a company file structure and set up Zend Navigation upon it.
I have got a included script like this:
<?php
//test1.php
$config = new Zend_Config_Xml( $_SERVER{'DOCUMENT_ROOT'}.$sitePath.'lib/navigation.xml', 'nav');
$container = new Zend_Navigation($config);
$view = new Zend_View();
$view->navigation($container);
$view->addScriptPath($_SERVER{'DOCUMENT_ROOT'}.$sitePath);
echo $view->render('test1.php');
?>
<!--And in my View Script:-->
<html>
<head>
</head>
<body>
<div id="menu">
<?php echo $this->navigation()->menu(); ?>
</div>
<div id="breadcrumbs">
You are in: <?php echo $this->navigation()->breadcrumbs()->setLinkLast(false)->setMinDepth(0)->render(); ?>
</div>
<div id="content">
Content of your page here.
</div>
</body>
However I have this error:
Fatal error: Call to a member function getParams() on a non-object in C:\Zend\ZendServer\share\ZendFramework\1.10\library\Zend\Navigation\Page\Mvc.php on line 133
Could anyone point me out where I go wrong? A lot of samples are using bootstrap and MVC but in my project I have to stick with the old file structure (Non-MVC), and I am struggling now.
I am studying these examples:
http://framework.zend.com/manual/en/zend.navigation.containers.html