[TYPO3-mvc] fluid as an email template

Andreas Lappe nd at off-pist.de
Tue Nov 30 21:16:00 CET 2010


On 30.11.10, Dawid Pacholczyk wrote:
> Hello List,
>  I need to send an email with my extension and I`m wondering how can I use
> fluid template as a template of my email. In old pi_base it wasn`t hard
> cause the content was in variable in my main class. Here they are separated.
> So how can I put fluid content (with dynamic content) in an email message ?
> Best regards,
> Dawid Pacholczyk

Hey David,

if you are willing to use extbase/fluid-1.3 beta or this project has a wider
timeframe, use this way:

$view = t3lib_div::makeInstance('Tx_Fluid_View_StandaloneView');
$view->setTemplatePathAndFilename(t3lib_extMgm::extPath('khorder').'/Resources/Private/Templates/mailService/HtmlMail.html');
$view->assign('customer', $customer);
$mailContent = $view->render();:

More on that in [1].

With extbase/fluid-1.2.x, it's not thaat pretty.

So long
Andy


[1]: http://forge.typo3.org/projects/typo3v4-mvc/repository/entry/fluid/tags/1.3.0beta1a/ChangeLog.txt
-- 
``Don't waste time -- or time will waste you.´´
                     [Muse, Knights of Cydonia]


More information about the TYPO3-project-typo3v4mvc mailing list