|
|||
|
Hello,
I have a layout.phtml and I need to get controller name and other several GET variables in there, however I can't do this. In ControllerName.php I can do it by $this->_request->getParam("controller"), but in layout.phtml $this IS Zend_View I guess, so I can't get a query variable from there. Can anyone help me with this? Any suggestions are appriciated. Thank you in Advance! |
|
||||
|
You should assign the controller name to a view variable you can call from within the view/layout scope. Typically its bad design to call the request/controller/... from the view scope, you should already have all the data processing done by then.
So in your controller: PHP Code:
PHP Code:
__________________
Zend Framework Resources: Zend Webinars | Reference Manual | API Docs | Books | FreeNode: #zftalk Getting Started Tutorials: Getting started with ZF | Getting started with Zend Auth |
![]() |
| Thread Tools | |
| Display Modes | |
|
|