I have a problem with Zend Framework. I created a plugin that requests some data from a database.
<?php
class Blog_Plugin_Navigation extends Zend_Controller_Plugin_Abstract {
public function routeShutdown(Zend_Controller_Request_Abstract $request) {
$navigation = new Application_Model_NavigationMapper();
$view = Zend_Layout::getMvcInstance()->getView();
$view->navigation = $navigation->fetchAll();
}
}
In my layout.phtml I use this:
<ul>
<?=$this->partialLoop('navigation-item.phtml', $this->navigation)?>
</ul>
When I use print_r to print out the array I get the values from my database, but if I visit my website I just get no values. navigation-item.phtml looks like this:
<li><a href="<?=$this->url?>"><?=$this->text?></a></li>
I just get this:
<li><a href=""></a></li>
Where is my mistake? Would be really nice, if someone could help me. :) Thanks in advance.