Pierre Rambaud wrote
> 
> Hi,
> 
> In your controller test ;)
> 
> var_dump($this->getEvent()->
> getRouteMatch());
> 
> Regards,
> 
> 
> 2012/5/11 cmple <roman.vidyayev@>
> 
>> I'm stuck
>>
>> Anyone?
>>
>> --
>> View this message in context:
>> http://zend-framework-community.634137.n4.nabble.com/ZF2-Access-controller-name-action-from-layout-tp4624104p4627351.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>
>> --
>> List: [email protected]
>> Info: http://framework.zend.com/archives
>> Unsubscribe: [email protected]
>>
>>
>>
> 
> 
> -- 
> Pierre RAMBAUD - I N S T A N T  |  L U X E - 40 rue d'Aboukir - 75002
> Paris
> - France
> Web : www.instantluxe.com
> 
Thanks Pierre,
But this means that I'll have to assign(return) the controller/action
variables to the view in every controller action, is there a way to directly
get those from inside of the layout.phtml or possibly assign the variables
in Module.php to the view?

here is a ZF1 example of what I need:
<?php
   // layout.phtml
   $controller = 
Zend_Controller_Front::getInstance()->getRequest()->getControllerName();
   $action =
Zend_Controller_Front::getInstance()->getRequest()->getActionName();
?>

--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/ZF2-Access-controller-name-action-from-layout-tp4624104p4641597.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