Skip to content
Snippets Groups Projects

Feature 5.3.0

Merged Georgi requested to merge feature_5.3.0 into master
7 files
+ 42
138
Compare changes
  • Side-by-side
  • Inline
Files
7
  • b584bd4d
    [TASK] #278 Make the cookie list template paths customizable · b584bd4d
    Georgi authored
@@ -146,22 +146,18 @@ class CookieListController extends ActionController {
}
// Set template
$view = GeneralUtility::makeInstance(StandaloneView::class);
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';
$templatePath = $this->settings['templates']['CookieList']['full'];
$templateRootPaths = $this->view->getRenderingContext()->getTemplatePaths()->getTemplateRootPaths();
$templateRootPaths[0] = $templatePath;
$this->view->setTemplateRootPaths($templateRootPaths);
}
$view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName($templateNameAndPath));
$view->setPartialRootPaths(['EXT:sg_cookie_optin/Resources/Private/Partials']);
$view->setLayoutRootPaths(['EXT:sg_cookie_optin/Resources/Private/Layouts']);
$view->assign('groups', $groups);
$view->assign('optin', $optin);
$view->assign('headline', $this->settings['headline'] ?? '');
$view->assign('description', $this->settings['description'] ?? '');
return $this->htmlResponse($view->render());
$this->view->assign('groups', $groups);
$this->view->assign('optin', $optin);
$this->view->assign('headline', $this->settings['headline'] ?? '');
$this->view->assign('description', $this->settings['description'] ?? '');
return $this->htmlResponse($this->view->render());
}
/**
Loading