Doing so means that I'll have to call render() in every action, instead of just letting ZF catch it automatically right? Currently, I only have a single action that needs to call a different template, so that's not an ideal solution.

Gabriel Malkas wrote:
Steven a écrit :
Hi all,

I have created my own implementation of Zend_View in order to take advantage of the Smarty templating engine. My class implements Zend_View_Interface to be compliant with the ZF standards.

One of my controllers has an 'editAction' method that attempts to render the 'input.html' template (via echo $this->_view->render('input.html');). The template 'input.html' is indeed rendered, however ZF still attempts to render the template 'edit.html' as well. This leads to the following error message being displayed at the top of the page:

Warning: Smarty error: unable to read resource: "article/edit.html" in /usr/local/php/lib/php/Smarty-2.6.18/libs/Smarty.class.php on line 1095

I'm using ZF 1.0.3 and it seems that the default behavior is to look for, and render, a template of the same name as the calling action. My question is: how do I circumvent that behavior, when required in cases such as the one above?

Thanks,
-- Steven


Hi Steven,

To disable the default behavior of ZF, you have to set 'noViewRenderer' to true, in your bootstrap file.

$frontController->setParam("noViewRenderer", true);


Regards,
Gabriel, from France ;)


Reply via email to