DwCookieWarning
Version: - stringSummary
Returns a cookie script that gives the visitor an user interface (warning) about cookies where the visitor can optin or out to allow the website to use cookies.
Settings
The content in the cookie warning is based on the selection in Management center - Web and HTTP - Cookie Manager - User Notification (Template based warnings / Custom).
Remarks
This tag is used internally by Dynamicweb CMS and cannot be used in the templates. It has no effect whether the tags is added to the page template or not.
The Cookie Manager (and the warning) can be disabled for your website in the Management center.
Examples
Outputting the template tag
@GetString("DwCookieWarning")
Check if tag has a value
@if(!string.IsNullOrWhiteSpace(GetString("DwCookieWarning"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
string storedTag = GetString("DwCookieWarning");
}
Outputting the template tag
<!--@DwCookieWarning-->
Check if string has a value
<!--@If Defined(@DwCookieWarning)-->
Let's output this tag here: <strong><!--@DwCookieWarning--></strong>
<!--@EndIf(@DwCookieWarning)-->