Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Archive

Setting Cookies

Started by Muut Archive 9 years ago · 2 replies · 1472 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 1280 9 years ago
Archive · by Muut Archive, 9 years ago
2 888 9 years ago
Archive · by Muut Archive, 9 years ago
2 4016 9 years ago
Archive · by Muut Archive, 9 years ago
1 2892 9 years ago
Archive · by Muut Archive, 9 years ago
3 1076 9 years ago