Cookie Abfrage im tpl nutzen

Hallo zusammen,

wie frage ich im tpl eine php Klasse ab?
Mit einer PHP Funktion (ifCookieExists) schaue ich ob mein Cookie existiert:
$cookieExists = true;
$cookie_value = “set”;
if ($_COOKIE[‘mycookie’] !== $cookie_value) {
$cookieExists = false;
}
return $cookieExists;

Sollte ich nicht mit smarty
[{if $oViewConf->ifCookieExists() == ‘true’}]

Abfragen können ob der Cookie vorhanden ist?

Vielen Dank für jede Hilfe.

$smarty.cookie
https://www.smarty.net/docsv2/de/language.variables.smarty.tpl

1000 dank!

Lösung:
[{if $smarty.cookies.mycookie == ‘set’}]

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.