Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ###### Set a dotCMS cookie with path and domain
- ## The normal dotCMS cookie tool doesn't let you specify options :(
- ## http://velocity.apache.org/tools/devel/javadoc/org/apache/velocity/tools/view/CookieTool.html
- $cookietool.add("testcookie",'lumberjack')
- ##-------------------------------------
- ## Setting a cookie in the header is more flexible :)
- $response.setHeader("Set-Cookie","testcookie=lumberjack;expires=Sat, 01-Jan-2012 00:00:00 GMT;path=/;domain=oc.edu")
- ## Get the cookie value
- $cookietool.testcookie.value
- ##-------------------------------------
- ## Created by mashing up these things:
- ## http://learndotcms.com/2009/09/creating-an-ical-feed-from-dotcms-contentcalendar/
- ## http://en.wikipedia.org/wiki/List_of_HTTP_header_fields
- ## http://msdn.microsoft.com/en-us/library/aa384321(v=vs.85).aspx
Advertisement
Add Comment
Please, Sign In to add comment