Cookie consent double url si page accueil

This commit is contained in:
Fred Tempez 2022-10-07 17:40:53 +02:00
parent 62a42e4a8e
commit 98ab381b0e
1 changed files with 7 additions and 1 deletions

View File

@ -1329,7 +1329,13 @@ class common
$item .= '<h3>' . $this->getData(['locale', 'cookies', 'titleLabel']) . '</h3>';
$item .= '<p>' . $this->getData(['locale', 'cookies', 'mainLabel']) . '</p>';
// Formulaire de réponse
$item .= '<form method="POST" action="' . helper::baseUrl() . $this->getUrl() . '" id="cookieForm">';
if (
$this->getData(['locale', 'homePageId']) === $this->getUrl(0)
) {
$item .= '<form method="POST" action="' . helper::baseUrl(false) . '" id="cookieForm">';
} else {
$item .= '<form method="POST" action="' . helper::baseUrl(true) . $this->getUrl(). '" id="cookieForm">';
}
$analytics = $this->getData(['config', 'seo', 'analyticsId']);
$stateCookieGA = $this->getInput('ZWII_COOKIE_GA_CONSENT') === 'true' ? 'checked="checked"' : '';
if ($analytics !== null and $analytics !== '') {