Indeed. But sometimes you have no choice but to do it this way since the
view doesn't have a reference to the request or response object.

   -- Mon


On Wed, Jan 6, 2010 at 3:10 PM, Саша Стаменковић <[email protected]> wrote:

> This
>
> Zend_Controller_Front::getInstance()->getRequest()->getControllerName()
>
> can be calle dfrom view script as well - scarry :)
>
> Regards,
> Saša Stamenković
>
>
>
> On Wed, Jan 6, 2010 at 7:26 AM, Mon Zafra <[email protected]> wrote:
>
>> Push it into the view from the controller. E.g. $this->view->controller =
>> $this->_request->getControllerName(); in your action method
>> Or pull it from the front controller singleton. E.g. $controller =
>> Zend_Controller_Front::getInstance()->getRequest()->getControllerName()
>>
>>    -- Mon
>>
>>
>>
>> On Wed, Jan 6, 2010 at 1:14 PM, Enkhbilguun Erdenetsogt <
>> [email protected]> wrote:
>>
>>> Hello,
>>>
>>> Anyone please help me to find how I can get controller name from a view
>>> script?
>>>
>>>
>>> --
>>> Enkhbilguun Erdenetsogt
>>>
>>
>>
>

Reply via email to