Typo3 电子邮件链接中使用的RealURL
在Typo3后端,我用流动模板重新设计了我的电子邮件正文。以以下方式:Typo3 电子邮件链接中使用的RealURL,typo3,realurl,Typo3,Realurl,在Typo3后端,我用流动模板重新设计了我的电子邮件正文。以以下方式: $emailView = $this->objectManager->get('TYPO3\\CMS\\Fluid\\View\\StandaloneView'); $templateName = 'path/to/email/template.html'; $extbaseFrameworkConfiguration = $this->configurationManager->getConfigu
$emailView = $this->objectManager->get('TYPO3\\CMS\\Fluid\\View\\StandaloneView');
$templateName = 'path/to/email/template.html';
$extbaseFrameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
$templateRootPath = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($extbaseFrameworkConfiguration['view']['templateRootPath']);
$templatePathAndFilename = $templateRootPath . $templateName;
$emailView->setTemplatePathAndFilename($templatePathAndFilename);
$emailView->assignMultiple($variables);
$emailBody = $emailView->render();
在加载的电子邮件模板中,我创建了一个绝对链接,指向具有以下行的页面:
<f:link.action absolute="true" pluginName="name" extensionName="extName" pageUid="{PageId}" controller="Ads" arguments="{uid: uid}">Klik hier</f:link.action>
Klik-hier
这只是生成了一个工作链接,而RealURL没有处理它。有可能完成吗?您需要一个有效的前端上下文,realurl才能工作。因此,我建议您将电子邮件模板移动到页面类型,并使用子请求来呈现HTML。您是否有一个如何实现此目的的示例?我发现一个更简单的解决方案是在配置文件中设置enable RealUrl,它可以工作。不知道为什么我没有早点尝试。