Zend Framework: Set Default Response Section
-
18-09-2019 - |
Question
I'm not 100% sure how to phrase this question so please help me if you can.
I have a system with modules that can be installed. I check if each module has a MenuController and if so I push an action onto the stack. The problem becomes that in each MenuController, if I don't use $this->render('index.phtml', 'menu'); then the output goes into the body. Is there some way that I can specify that the output for the menu controllers should go into the 'menu' section by default?
Solution 2
I ended up just extending Zend_Controller_Request_Http and adding methods for DefaultName().
OTHER TIPS
in MenuController use $this->_helper->viewrenderer->setResponseSegment('sth');
in preDispatch() :)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow