I am trying to use a layout for every action in the controller. For example, I have three actions in the index controller. These are indexAction, testAction and welcomeAction. I created three xml layout files. index.xml, test.xml and welcome.xml. Finally, I created a plugin.
class Moon_Layout_Append extends Zend_Controller_Plugin_Abstract{
public function preDispatch($request){
$layoutFile = APPLICATION_PATH."/Modules/".$request->module."/layout/".$request->action.".xml";
$layout = new Zend_Config_Xml($layoutFile,'index');
}
}
the problem is ... how do I access the layout object to set the content that I read from xml?
source
share