lsascha / registeraddress

newsletter registration extension to tt_address made in Extbase + Fluid for Typo3. with double-opt in, user editing and unsubscribing
GNU General Public License v2.0
7 stars 18 forks source link

Overwriting of email template not possible #3

Closed SventB closed 6 years ago

SventB commented 7 years ago

The overwriting of the email templates, e.g. MailNewsletterRegistration.txt, is not possible because of this line of code:

$templateRootPath = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($extbaseFrameworkConfiguration['view']['templateRootPaths'][100]);

Please use this code (I commented out your code, so you see which lines of code are not needed any more):

$view->setLayoutRootPaths($extbaseFrameworkConfiguration['view']['layoutRootPaths']);
$view->setPartialRootPaths($extbaseFrameworkConfiguration['view']['partialRootPaths']);
$view->setTemplateRootPaths($extbaseFrameworkConfiguration['view']['templateRootPaths']);
#$templateRootPath = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($extbaseFrameworkConfiguration['view']['templateRootPaths'][100]);
#$templatePathAndFilename = $templateRootPath . $this->request->getControllerName().'/' . $templateName . '.' . $format;
#$view->setTemplatePathAndFilename($templatePathAndFilename);
$view->setTemplate($this->request->getControllerName() . '/' . $templateName);