Ok.. it's official...
Every time i post on the forum an help request, i quickly find the solution in a matter of minutes
Quote:
|
1. How could tell Zend_View not to render action views automatically?
|
In the bootstrap i resolved in this way:
PHP Code:
$viewHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
$viewHelper->setNeverRender(true);
and then in the controllers i can output my arbitrary templates in this way:
PHP Code:
public function indexAction() {
print $this->view->render('/path/to/my/view.phtml');
}
Quote:
|
2. How to set values for placeholders (eg. $this->layout()->somevar in the view) from the controller?
|
This is quite simple. I just added this on my controller (and seems to work without problems):
PHP Code:
public function indexAction() {
$this->_helper->layout()->somevar = $this->view->render('your/view.phtml');
}
Hope this helps someone who encounters the same problem....
