Global:CookieOptInLevel

Version: - globalvalue  

Summary

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

Settings

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

Remarks

Available values:

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

Functional is default.

Examples

Outputting the template tag

@GetGlobalValue("Global:CookieOptInLevel")

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

<!--@Global:CookieOptInLevel-->

Check if globalvalue has a value

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