Global:Request.Host

Version: - globalvalue  

Summary

Returns the host name for the websitte like this: doc.dynamicweb-cms.com.

Settings

The value is generated automatically.

Examples

Outputting the template tag

@GetGlobalValue("Global:Request.Host")

Check if tag has a value

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

Assign tag to a value for later use

@{ string storedTag = GetGlobalValue("Global:Request.Host"); }

Outputting the template tag

<!--@Global:Request.Host-->

Check if globalvalue has a value

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