Customizable Fluid template paths for cookielist plugin
It would be useful to override the template paths for the "Cookie List" plugin.
Currently, no override via TypoScript is possible. The paths are fixed inside the OptinController:
if ($optin['template_selection'] === 1) {
$templateNameAndPath = 'EXT:sg_cookie_optin/Resources/Private/Templates/CookieList/Full.html';
} else {
$templateNameAndPath = 'EXT:sg_cookie_optin/Resources/Private/Templates/CookieList/Default.html';
}
$view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName($templateNameAndPath));
$view->setPartialRootPaths(['EXT:sg_cookie_optin/Resources/Private/Partials']);
$view->setLayoutRootPaths(['EXT:sg_cookie_optin/Resources/Private/Layouts']);
I can see the following advantages:
- Custom markup for the table/plugin. For example: The plugin itself has a mandatory headline and description, which might be undesired to render (if the plugin is placed on a data privacy page with already existing explanation text).
-
Rendering HTML markup in cookie group description. I know, the description field provides no RTE. But we recently used HTML links in it, and these links were correctly rendered inside the consent modal. Only the "Cookie list" Fluid template renders it as plain text (which would have been an easy fix in the project using
{group.description -> f:format.html()}
).
What do you think?