Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Setting Cookies

Started by Muut Archive 9 years ago · 2 replies · 2136 views
9 years ago

How does one set a cookie? Can't find any info.

Do I have to write a Twig plugin to add a set_cookie() function?

Many thanks

9 years ago

A plugin, written in PHP, can facilitate a set_cookie()-function, which you can use in conjunction with get_cookie(). But yes, there is no built-in way to set a cookie from Twig.

9 years ago

Thanks, just wrote a plugin to do it.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 2910 9 years ago
Archive · by Muut Archive, 9 years ago
2 1894 9 years ago
Archive · by Muut Archive, 9 years ago
2 5229 9 years ago
Archive · by Muut Archive, 9 years ago
1 4050 9 years ago
Archive · by Muut Archive, 9 years ago
3 1985 9 years ago