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