[TYPO3-mvc] setTemplatePathAndFileName reverting to NULL

Christine Gerpheide cgerpheide at gmail.com
Mon Oct 18 19:16:39 CEST 2010


2010/10/18 Mathias Bolt Lesniak, LiliO Design <mathias at lilio.com>

> Hi!
>
> I am trying to render a fluid template for an e-mail, but
> $this->view->setTemplatePathAndFileName() does not seem to work.
>
> If I output the value of $this->templatePathAndFilename within
> resolveTemplatePathAndFilename() within Tx_Fluid_View_TemplateView, it tells
> me the variable is NULL.
>
> Here's the related lines of code:
> ****
>
> $this->view->setTemplatePathAndFileName(t3lib_extMgm::extPath('lilio_formsystem').'Resources/Private/Templates/FormSystem/emailIfChangedTemplate.html');
> file_put_contents('/tmp/viewtest.html', $this->view->render());
> ****
>
> (Since this is meant for an e-mail I am using file_put_contents() to output
> the rendered data to a file. The data output to the file is:
>
> ****
> <!-- This is the output of the Empty View. An appropriate View was not
> found. -->
> ****
>
> (sic.)
>
>
> Hope you can help!
>
> Best wishes
>
> Mathias Bolt Lesniak
> LiliO Design - www.lilio.com
> mathias at lilio.com
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>



Hi Mathias,

Not sure if this is your problem, but as far as I know, if the template
matching your action name doesn't exist (even if you don't use it)
extbase/fluid won't render it.  So for instance if you have updateAction(),
which renders an email and then redirects to another action, update.html
still has to exist (though it can be blank) in order to get your email html
to render.  In my opinion this is a bug..

HTH,
Christine


More information about the TYPO3-project-typo3v4mvc mailing list