Setting Cookies

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

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.

Thanks, just wrote a plugin to do it.