Page 1 of 1

Get current controller from zend_layout

Posted: Mon Sep 22, 2008 12:02 pm
by BornForCode
I would like to create a menu and highlight the current page (menu items) to be able to do that i have to get the current controller or action from Zend_Layout.

Is there anyone that have a solution because this problem driven me crazzy :banghead:

Re: Get current controller from zend_layout

Posted: Mon Sep 22, 2008 6:07 pm
by josh
$this->_request->_controller

Re: Get current controller from zend_layout

Posted: Tue Sep 23, 2008 11:23 am
by BornForCode
In layout.phtml you don't have access to $this->_request, or at least in my case is null :(

Re: Get current controller from zend_layout

Posted: Tue Sep 23, 2008 10:03 pm
by josh
so assign the variable to the view from the controller