开发者

getting filename on Zend_View

Is it possible to get the filename of a pht开发者_如何学编程ml file that's been assign to Zend_View?

For instance,

i've got this on my controller

$this->view = new Zend_View();

$this->view->setScriptPath(APPLICATION_PATH . "/views/scripts/"); $this->view->render('email/xxx.phtml');

the question is,

how do I get 'email/xxx.phtml' from the object?


you can use the ViewRenderer Helper, from your controller:

$viewRenderer = $this->_helper->viewRenderer;
$viewScript = $viewRenderer->getViewScript();

take a look at http://framework.zend.com/manual/en/zend.controller.actionhelpers.html#zend.controller.actionhelper.viewrenderer.basicusage

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜