Global:Page.IsProtected
Version: - globalvalueSummary
Returns True if the page is password protected in Permissions and is blank if there is no protection. Can be used with If Defined
statements to show e.g. a login box.
Settings
The value is generated automatically.
Examples
Outputting the template tag
@GetGlobalValue("Global:Page.IsProtected")
Check if tag has a value
@if(!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Page.IsProtected"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
string storedTag = GetGlobalValue("Global:Page.IsProtected");
}
Outputting the template tag
<!--@Global:Page.IsProtected-->
Check if globalvalue has a value
<!--@If Defined(@Global:Page.IsProtected)-->
Let's output this tag here: <strong><!--@Global:Page.IsProtected--></strong>
<!--@EndIf(@Global:Page.IsProtected)-->