简体   繁体   中英

How to check cookie in umbraco?

I want to check cookie in umbraco , is it possible or not ?

If yes then how can i set cookie in template and can retrive cookie's value in template or xslt?

You could use the built in Library to do this:

<xsl:value-of select="umbraco.library:RequestCookies('cookie')" />

Add that to your XSLT and you can call the macro from any pages in your site.

Just to complete the answer you would use

<xsl:value-of select="umbraco.library:setCookie('cookie')" /> 

to set the value and the above code to get the value.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM