-
Notifications
You must be signed in to change notification settings - Fork 5
views
Harmen Janssen edited this page Jun 28, 2016
·
2 revisions
Next to Zend Framework's own phtml
templates, Garp also supports Twig rendering.
Read more about Twig rendering in its own section
This is mostly straight up Zend Framework stuff, but it's a helpful FAQ of things you may encounter in the Garp context.
$this->_helper->layout->disableLayout();
// Render immediately with current parameters:
$this->renderScript('post/view.phtml');
// Simply alter the view that will be rendered after the controller action finishes:
$this->_helper->viewRenderer('post/view', null, true)
$this->_helper->layout->setLayout('xml');
$this->_helper->layout->isEnabled();
$this->_helper->layout->setLayoutPath(GARP_APPLICATION_PATH.'/modules/g/views/layouts');
$this->_helper->layout->setLayout('dinges');
$this->_helper->viewRenderer->setNoRender(true);
$viewObj = Zend_Controller_Front::getInstance()->getParam('bootstrap')->getResource('view');
Garp defines a bunch of custom view helpers: