Global tags
Global tags in HTML templates gives the possibility to get hold of information from the execution context in any template, like Pageview, cart etc.
Razor has the possibility to get access to everything because the Dynamicweb API can be utilized directly in the template.
Therefore, global template tags are not available as regular tags when using a Razor template. It coulde be the Global:Area.ID
tag. In Razor that would translate into @GetValue(Global:Area.ID)
but this is NOT available in Razor templates. No Global.* tags are available from Razor using the GetValue, GetString
etc.
Instead of using the global tags, consider using the API instead like this:
@Dynamicweb.Frontend.PageView.Current().Area.ID
Using the API is the recommended approach.
As an alternative the global tags can be accessed using the GetGlobalValue property like this:
Area ID: @GetGlobalValue("Global:Area.ID")
Available tags
Global:Area.Culture.CountryCode
Returns the code name for the website culture in this format: DK.
@GetGlobalValue("Global:Area.Culture.CountryCode")
Global:Area.Culture.Currency
Returns the name of the currency, e.g. Danish kroner.
@GetGlobalValue("Global:Area.Culture.Currency")
Global:Area.Culture.DisplayCountryName
Returns the country name for the website culture in this format: Denmark.
@GetGlobalValue("Global:Area.Culture.DisplayCountryName")
Global:Area.Culture.DisplayName
Returns the website culture in this format: Danish (Denmark).
@GetGlobalValue("Global:Area.Culture.DisplayName")
Global:Area.Culture.Name
Returns the code name for the website culture in this format: da-DK.
@GetGlobalValue("Global:Area.Culture.Name")
Global:Area.Culture.NativeCountryName
Returns the native country name for the website culture in this format: Danmark.
@GetGlobalValue("Global:Area.Culture.NativeCountryName")
Global:Area.Culture.NativeName
Returns the native name for the website culture in this format: Dansk (Danmark).
@GetGlobalValue("Global:Area.Culture.NativeName")
Global:Area.Lang
Returns the 2 letter ISO language code for the current area, e.g. if you use English as language then the Lang tag is en.
@GetGlobalValue("Global:Area.Lang")
Global:Area.LongLang
Returns the extended ISO language code for the current area (language-region), e.g. if you use English as language in United States then the LongLang tag is: en-US.
@GetGlobalValue("Global:Area.LongLang")
Global:Area.Primarydomain
Returns the primary domain for the current website.
@GetGlobalValue("Global:Area.Primarydomain")
Global:CookieOptInLevel
Renders a value that shows what optinlevel that has been selected by the visitor.
@GetGlobalValue("Global:CookieOptInLevel")
Global:Device.DetectionDisabled
Returns True if detection of a specific device or platform is disabled.
@GetGlobalValue("Global:Device.DetectionDisabled")
Global:Device.Is[Device]
Returns a value if a specific device or platform is detected.
@GetGlobalValue("Global:Device.Is[Device]")
Global:eCommerce.Cart.CartIsPresent
Returns True if products are added to the Shopping cart.
@GetGlobalValue("Global:eCommerce.Cart.CartIsPresent")
Global:eCommerce.CartPageID
Returns the ID for the first page with the Shopping cart module on the current website.
@GetGlobalValue("Global:eCommerce.CartPageID")
Global:eCommerce.Currency
Returns the currency that is used in the context.
@GetGlobalValue("Global:eCommerce.Currency")
Global:eCommerce.Order.OrderLines.TotalProductQuantity
Returns the total number of products in the Shopping Cart.
@GetGlobalValue("Global:eCommerce.Order.OrderLines.TotalProductQuantity")
Global:eCommerce.PricesWithVat
Returns True if VAT is enabled in website settings.
@GetGlobalValue("Global:eCommerce.PricesWithVat")
Global:eCommerce.ReverseChargeForVatToken
Returns a token that is calculated dynamically and used with the orderLine property Ecom:Order:OrderLine.ReverseChargeForVat
to indicate whether the price is in a reverse charge for VAT state.
@GetGlobalValue("Global:eCommerce.ReverseChargeForVatToken")
Global:Extranet.Address
Returns the address of the extranet user.
@GetGlobalValue("Global:Extranet.Address")
Global:Extranet.Address2
Returns the second address of the extranet user.
@GetGlobalValue("Global:Extranet.Address2")
Global:Extranet.Company
Returns the company of the extranet user.
@GetGlobalValue("Global:Extranet.Company")
Global:Extranet.Country
Returns the country of the extranet user.
@GetGlobalValue("Global:Extranet.Country")
Global:Extranet.CustomerNumber
Returns the customer number of the extranet user.
@GetGlobalValue("Global:Extranet.CustomerNumber")
Global:Extranet.Department
Returns the department of the user.
@GetGlobalValue("Global:Extranet.Department")
Global:Extranet.Email
Returns the e-mail of the xtranet user.
@GetGlobalValue("Global:Extranet.Email")
Global:Extranet.ExternalLogin.ExternalEmail
Returns external E-mail address of the extranet external login.
@GetGlobalValue("Global:Extranet.ExternalLogin.ExternalEmail")
Global:Extranet.ExternalLogin.ExternalUserName
Returns external user name of the extranet external login.
@GetGlobalValue("Global:Extranet.ExternalLogin.ExternalUserName")
Global:Extranet.ExternalLogin.ProviderID
Returns Provider ID of the extranet external login.
@GetGlobalValue("Global:Extranet.ExternalLogin.ProviderID")
Global:Extranet.ExternalLogin.ProviderKey
Returns Provider Key of the extranet external login.
@GetGlobalValue("Global:Extranet.ExternalLogin.ProviderKey")
Global:Extranet.ExternalLogin.ProviderName
Returns Provider Name of the extranet external login.
@GetGlobalValue("Global:Extranet.ExternalLogin.ProviderName")
Global:Extranet.ExternalLogin.ProviderType
Returns Provider Type of the extranet external login.
@GetGlobalValue("Global:Extranet.ExternalLogin.ProviderType")
Global:Extranet.FirstName
Returns the first name of the extranet user.
@GetGlobalValue("Global:Extranet.FirstName")
Global:Extranet.Groups
Returns a CSV list of authorized extranet user groups.
@GetGlobalValue("Global:Extranet.Groups")
Global:Extranet.HouseNumber
Returns the house number for the extranet user.
@GetGlobalValue("Global:Extranet.HouseNumber")
Global:Extranet.Image
Returns the image of the extranet user.
@GetGlobalValue("Global:Extranet.Image")
Global:Extranet.Image.Clean
Returns the path to the image of a user.
@GetGlobalValue("Global:Extranet.Image.Clean")
Global:Extranet.ImpersonationMode
Returns state of Imersonation mode, based on current value of Mode radio-button in MC>Control Panel>Modules>Usr Management>Impersonation.
@GetString("Global:Extranet.ImpersonationMode")
Global:Extranet.Jobtitle
Returns the job title of the user.
@GetGlobalValue("Global:Extranet.Jobtitle")
Global:Extranet.LastName
Returns the last name of the extranet user.
@GetGlobalValue("Global:Extranet.LastName")
Global:Extranet.MiddleName
Returns the middle name of the extranet user.
@GetString("Global:Extranet.MiddleName")
Global:Extranet.Name
Returns the name of the extranet user.
@GetGlobalValue("Global:Extranet.Name")
Global:Extranet.Password
Returns the password for the extranet user.
@GetGlobalValue("Global:Extranet.Password")
Global:Extranet.Phone
Returns the phone number of the user.
@GetGlobalValue("Global:Extranet.Phone")
Global:Extranet.PhoneBusiness
Returns the business phone number of the user.
@GetGlobalValue("Global:Extranet.PhoneBusiness")
Global:Extranet.PhoneMobile
Returns the mobile phone number of the extranet user.
@GetGlobalValue("Global:Extranet.PhoneMobile")
Global:Extranet.State
Returns the state (or region) for he extranet user.
@GetGlobalValue("Global:Extranet.State")
Global:Extranet.Title
Returns the title of the extranet user.
@GetGlobalValue("Global:Extranet.Title")
Global:Extranet.UserID
Returns the UserID of the extranet/intranet user.
@GetGlobalValue("Global:Extranet.UserID")
Global:Extranet.UserName
Returns the user name for the extranet/intranet user.
@GetGlobalValue("Global:Extranet.UserName")
Global:OMC.Visitor.HasProfiles
Returns True if the solution have at least one visitor profile in Online Marketing Center.
@GetBoolean("Global:OMC.Visitor.HasProfiles")
Global:OMC.Visitor.ID
Returns an unique ID for the visitor.
@GetInteger("Global:OMC.Visitor.ID")
Global:OMC.Visitor.IsReturning
Returns True if the visitor has visited the solution before.
@GetBoolean("Global:OMC.Visitor.IsReturning")
Global:OMC.Visitor.LastVisit
Returns the time for the last visit of the user.
@GetDate("Global:OMC.Visitor.LastVisit")
Global:OMC.Visitor.PrimaryProfile.ID
Returns an ID for the primary visitor profile (with the highest amount of points).
@GetInteger("Global:OMC.Visitor.PrimaryProfile.ID")
Global:OMC.Visitor.PrimaryProfile.Reference
Returns an unique reference number for the primary visitor profile (with the highest amount of points).
@GetString("Global:OMC.Visitor.PrimaryProfile.Reference")
Global:OMC.Visitor.Profile.[Reference].ID
Returns an ID for the specific visitor profile.
@GetInteger("Global:OMC.Visitor.Profile.[Reference].ID")
Global:OMC.Visitor.Profile.[Reference].Name
Returns the name of a specific visitor profile.
@GetString("Global:OMC.Visitor.Profile.[Reference].Name")
Global:OMC.Visitor.Profile.[Reference].Points
Returns the number of points that the user gets from the specific visitor profile.
@GetString("Global:OMC.Visitor.Profile.[Reference].Points")
Global:OMC.Visitor.Profile.[Reference].Reference
An unique reference number for a specific visitor profile.
@GetString("Global:OMC.Visitor.Profile.[Reference].Reference")
Global:OMC.Visitor.SecondaryProfile.ID
Returns an ID for the secondary visitor profile (with the second highest amount of points).
@GetInteger("Global:OMC.Visitor.SecondaryProfile.ID")
Global:OMC.Visitor.SecondaryProfile.Name
Returns the name for the secondary visitor profile (with the second highest amount of points)
@GetString("Global:OMC.Visitor.SecondaryProfile.Name")
Global:OMC.Visitor.SecondaryProfile.Points
Returns points related to secondary profile of OMC visitor.
@GetString("Global:OMC.Visitor.SecondaryProfile.Points")
Global:OMC.Visitor.SecondaryProfile.Reference
Returns an unique reference number for the secondary visitor profile (with the second highest amount of points).
@GetString("Global:OMC.Visitor.SecondaryProfile.Reference")
Global:Page.Editor.Email
Returns the name of the last editor of the current page.
@GetGlobalValue("Global:Page.Editor.Email")
Global:Page.Editor.Fax
Returns the fax number of the page manager of the current page.
@GetGlobalValue("Global:Page.Editor.Fax")
Global:Page.Editor.Name
Returns the name of the last editor of the current page.
@GetGlobalValue("Global:Page.Editor.Name")
Global:Page.Editor.Phone
Returns the phone number of the last editor of the current page.
@GetGlobalValue("Global:Page.Editor.Phone")
Global:Page.Editor.Username
Returns the username of the last editor of the current page.
@GetGlobalValue("Global:Page.Editor.Username")
Global:Page.IsCurrentUserAllowed
Returns True if the current user has access to the page.
@GetString("Global:Page.IsCurrentUserAllowed")
Global:Page.IsProtected
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.
@GetGlobalValue("Global:Page.IsProtected")
Global:Page.Manager.Email
Returns the E-mail of the page manager of the current page.
@GetGlobalValue("Global:Page.Manager.Email")
Global:Page.Manager.Fax
Returns the fax number of the page manager of the current page.
@GetGlobalValue("Global:Page.Manager.Fax")
Global:Page.Manager.Name
Returns the name of the page manager of the current page.
@GetGlobalValue("Global:Page.Manager.Name")
Global:Page.Manager.Phone
Returns the phone number of the page manager of the current page.
@GetGlobalValue("Global:Page.Manager.Phone")
Global:Page.Manager.Username
Returns the user name of the page manager of the current page.
@GetGlobalValue("Global:Page.Manager.Username")
Global:Page.Top.ID
Returns the ID of the top page in the current path.
@GetGlobalValue("Global:Page.Top.ID")
Global:Page.Top.Name
Returns the name of the top page in the current path.
@GetGlobalValue("Global:Page.Top.Name")
Global:Pageview.LayoutTemplate
Returns the name of the layout template that the page is using.
@GetGlobalValue("Global:Pageview.LayoutTemplate")
Global:Pageview.Url
Returns the URL as typed in the browser - the search friendly URL, i.e. /da-DK/Frontpage.aspx.
@GetGlobalValue("Global:Pageview.Url")
Global:Pageview.Url.Raw
Returns the URL as interpreted by Dynamicweb - i.e. /Default.aspx?ID=204.
@GetGlobalValue("Global:Pageview.Url.Raw")
Global:Request.AbsoluteUri
Returns the absolute url like this: http://doc.dynamicweb-cms.com/Default.aspx?ID=204.
@GetGlobalValue("Global:Request.AbsoluteUri")
Global:Request.Host
Returns the host name for the websitte like this: doc.dynamicweb-cms.com.
@GetGlobalValue("Global:Request.Host")
Global:Request.IsSecureConnection
Returns the original URI string that was passed to the Uri constructor like this: http://http://doc.dynamicweb-cms.com/Default.aspx?ID=204
@GetGlobalValue("Global:Request.IsSecureConnection")
Global:Request.OriginalString
Returns the original url like this: http://doc.dynamicweb-cms.com/Default.aspx?ID=204
@GetString("Global:Request.OriginalString")
Global:Request.PathAndQuery
Returns the AbsolutePath and Query properties separated by a question mark (?).
Without a query string: /Default.aspx?ID=204
With a query string: /Default.aspx?ID=21&M=News&PID=1296&NewsID=7
@GetGlobalValue("Global:Request.PathAndQuery")
Global:Request.Port
Returns the port number of this URI.
@GetGlobalValue("Global:Request.Port")
Global:Request.Query
Returns any query information included in the specified URI like this: ?ID=21&M=News&PID=1296&NewsID=7.
@GetGlobalValue("Global:Request.Query")
Global:Request.Scheme
Returns the scheme name for this URI. Returns e.g. http if the resource is accessed through HTTP.
Find other schemes here: http://msdn.microsoft.com/en-us/library/system.uri.scheme.aspx.
@GetString("Global:Request.Scheme")
Global:Request.Url
Returns information about the URL of the current request like this: http://doc.dynamicweb-cms.com//Default.aspx?ID=204
@GetGlobalValue("Global:Request.Url")
Global:Request.UserAgent
Returns the user agent string of the client browser.
Most Web browsers use a User-Agent value as follows: Mozilla/[version] ([system and browser information]) [platform] ([platform details]) [extensions].
Example: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
@GetGlobalValue("Global:Request.UserAgent")