[Flow] StandaloneView for emails and templatePathAndFileName
Mark Kuiphuis
typo3 at markyourweb.com
Fri Aug 9 06:27:18 CEST 2013
Hi all,
In TYPO3 Flow I would like to use a template for sending out an email. I
have been using this functionality before in Extbase, but was wondering
if the code below is the way to go to actually set the
templatePathAndFileName or is there a better approach where I don't have
to hardcode the dir/to/file after the FLOW_PATH_ROOT constant?
It will be called from within an action within a controller...
$emailView = new \TYPO3\Fluid\View\StandaloneView();
$emailView->setFormat('html');
$templatePathAndFileName = FLOW_PATH_ROOT .
'Packages/Application/Vendor.PackageName/Resources/Private/Templates/Front/Password/Email.html';
$emailView->setTemplatePathAndFilename($templatePathAndFileName);
...
...
...
$emailBody = $emailView->render();
Thanks,
Kind regards,
Mark Kuiphuis
More information about the Flow
mailing list