2009年1月7日星期三

RE: [fw-mvc] Zend_View phtml scripts path default when using startMvc

getScriptPaths() doesn't take into account the name of the controller...


Jaime Garcia-2 wrote:
>
> In your controller:
>
> $scriptPath = $this->view->getScriptPaths();
> //and set path for your own view
> $yourview->setScriptPath($scriptPath);
> //and then render it!
> $yourview->render('email');
>
>
> Hope this help you,
>
> Regards!
>
>> -----Mensaje original-----
>> De: webPragmatist [mailto:chris@webpragmatist.com]
>> Enviado el: Martes, 06 de Enero de 2009 12:46 p.m.
>> Para: fw-mvc@lists.zend.com
>> Asunto: [fw-mvc] Zend_View phtml scripts path default when using
>> startMvc
>>
>>
>> I was under the impression that Zend could figure out what I meant by
>> $view->render() if I am in a specific controller.
>>
>> For instance, by default it knows to load
>> /auth/views/scripts/forgotpassword/create.phtml when the createAction()
>> is
>> called in the ForgotPasswordController.php
>>
>> ...but...
>>
>> If I instantiate a new $view and call $view->render('email.phtml') it
>> does
>> not know to look in /auth/views/scripts/forgotpassword/
>>
>> Any thoughts on how to do accomplish what I am doing or a better way to
>> load
>> a simple email template?
>> --
>> View this message in context: http://www.nabble.com/Zend_View-phtml-
>> scripts-path-default-when-using-startMvc-tp21316461p21316461.html
>> Sent from the Zend MVC mailing list archive at Nabble.com.
>
>
>
>

--
View this message in context: http://www.nabble.com/Zend_View-phtml-scripts-path-default-when-using-startMvc-tp21316461p21335548.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: