Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Checking a session cookie value from within a transformation View modes: 
User avatar
Member
Member
Rawe - 10/29/2012 11:13:50 AM
   
Checking a session cookie value from within a transformation
Hello,

Is it possible to check a value of a session cookie from within a transformation. I have a widget that sets the value, but need to display a link in the transformation depending on whether the cookie value is set.

I have tried using a macro {%cookiename%}, though this gets output to the page as it is.

Thanks for any help.

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 10/29/2012 1:43:58 PM
   
RE:Checking a session cookie value from within a transformation
Hello,

you can use a cookie macro and then resolve macro in transformation:

<%# CMS.CMSHelper.CMSContext.CurrentResolver.ResolveMacros("{@cookie_name@}") %>

Best regards,
Martin Danko