Я хочу получить HTML-контент в контроллере.для этого
public function posteemailAction(){ $view=$this->render("auth-acl/email/_getemail.phtml"); print_r($view);die; }
Может кто-нибудь помочь для получения содержимого html в контроллере.Спасибо
Попробуйте это:
public function ajaxAction() { // Turns off the layout and the view $this->_helper->layout()->disableLayout(); $this->_helper->viewRenderer->setNoRender(true); // Creates a new instance of Zend_View $html = new Zend_View(); // Set a script path for above view $html->setScriptPath(APPLICATION_PATH . '/views/scripts/your_custom_path/'); // Assinging some data to the view $html->assign('myVar', $someValue); // Renders the view to specified variable $responseContent = $html->render('mycontent.phtml'); echo $responseContent; }