View Single Post
  #2 (permalink)  
Old 04-30-2008, 01:46 PM
Elemental's Avatar
Elemental Elemental is offline
Senior Member
 
Join Date: Jul 2007
Posts: 119
Default

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:
$this->view->assign('controllerName'$this->_request->getParam('controller')); 
Then in the layout or view:
PHP Code:
<?= $this->controllerName?>
__________________
Zend Framework Resources: Zend Webinars | Reference Manual | API Docs | Books | FreeNode: #zftalk
Getting Started Tutorials: Getting started with ZF | Getting started with Zend Auth
Reply With Quote