Version: - globalvalue  


Renders a value that shows what optinlevel that has been selected by the visitor.


The value is based on the selection by the visitor in the cookie warning that pops up when Cookie Manager is enabled.


Available values:

  • None (Do not accept cookies)
  • Functional (Do only accept functional cookies)
  • All (Accept all cookies)

Functional is default.


Outputting the template tag


Check if tag has a value

@if(!string.IsNullOrWhiteSpace(GetGlobalValue("Global:CookieOptInLevel"))) { @* Tag has value, so let's do something useful here. *@ }

Assign tag to a value for later use

@{ string storedTag = GetGlobalValue("Global:CookieOptInLevel"); }

Outputting the template tag


Check if globalvalue has a value

<!--@If Defined(@Global:CookieOptInLevel)--> Let's output this tag here: <strong><!--@Global:CookieOptInLevel--></strong> <!--@EndIf(@Global:CookieOptInLevel)-->