Frank Brückner wrote
> 
> Am Donnerstag, den 12.04.2012, 07:25 +0200 schrieb dershao 
>  <dershao@>:
>> Same here.
>> It's necessary to set the helper and routematch manually in MVC.
>> So the  provided example at
>> 
>> http://packages.zendframework.com/docs/latest/manual/en/zend.view.helpers.html#zend.view.helpers.initial.navigation
>> can not work.
>>
>> Maybe there is an undocumented requirement so the objects will be 
>> injected
>> somehow.
> 
>  Work in progress: https://github.com/zendframework/zf2/pull/952
> 
>> The documentation needs to be reviewed anyway.
>> There are a lot of false example, hints, descriptions etc.!
> 
>  Update the docs before features are implemented and components 
>  refactored?
>  You work with a beta version!
> 
>> --
>> View this message in context:
>> 
>> http://zend-framework-community.634137.n4.nabble.com/Zend-Navigation-problem-tp4256771p4552041.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
> 
> 
> -- 
> List: [email protected]
> Info: http://framework.zend.com/archives
> Unsubscribe: [email protected]
> 
It looks like the fix was closed/reverted?
Is there another way of using controller/action in navigation helper?
here is what i'm trying to do:

//config/navigation.php
<?php
return array(
    array(
        'label' => 'Login',
        'controller' => 'user',
        'action' => 'login',
    ),
);

//Module:
public function initializeView($e)
{
$navigation = include __DIR__ . '/config/navigation.php';
$renderer->plugin('navigation')->setContainer(new Navigation($navigation));
}

//layout.phtml:
<?php echo $this->navigation()->render(); ?>

I get the following error:
PHP Fatal error:  Uncaught exception
'Zend\Navigation\Exception\DomainException' with message
'Zend\Navigation\Page\Mvc::getHref cannot execute as no Zend\View\Helper\Url
instance is composed' in /***/Zend/Navigation/Page/Mvc.php:187

Thanks!


--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/Zend-Navigation-problem-tp4256771p4583711.html
Sent from the Zend Framework mailing list archive at Nabble.com.

--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to