2011年3月4日星期五

Re: [fw-mvc] troubles with custom view-scripts location and noViewRender=true by default

I would approach this problem differently:

1) Use application.ini to set up your custom view script path

resources.view.basePath = APPLICATION_PATH "/custom/path/to/views/"

2) Use the plugin to disable the view renderer as necessary

$viewRenderer =
Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
$viewRenderer->setNoRender(true); // disable view rendering

Then you can wrap that in your logic to decide whether views should be
rendered.

I hope this helps.

--
*Hector Virgen*
Sr. Web Developer
http://www.virgentech.com

没有评论: