Global:Device.Is[Device]

Version: - globalvalue  

Summary

Returns a value if a specific device or platform is detected.

Settings

The value is generated automatically.

Remarks

The tags returns [blank] or True, where blank is false.

List of tags:

Global:Device.IsMobile

Returns True if user is using a mobile phone.

Global:Device.IsTablet

Returns True if user is using a tablet.

Global:Device.IsDesktop

Returns True if user is using a computer.

Global:Device.IsBot

Returns True if user is a Bot.

Global:Device.IsIPhone

Returns True if user is using an Iphone.

Global:Device.IsAndroidPhone

Returns True if user is using an Android phone.

Global:Device.IsWindowsPhone

Returns True if user is using a Windows phone.

Global:Device.IsIPad

Returns True if user is using an Ipad.

Global:Device.IsAndroidTablet

Returns True if user is using an Android tablet.

Global:Device.IsWindowsTablet 

Returns True if user is using a Windows tablet.

Global:Device.IsAndroid

Returns True if user is using Android as platform.

Global:Device.IsIOS

Returns True if user is using IOS as platform.

Global:Device.IsWindows

Returns True if user is using Windows as platform.

Global:Device.IsOther

Returns True if user is using a different platform.

Examples

Outputting the template tag

@GetGlobalValue("Global:Device.Is[Device]")

Check if tag has a value

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

Assign tag to a value for later use

@{ string storedTag = GetGlobalValue("Global:Device.Is[Device]"); }

Outputting the template tag

<!--@Global:Device.Is[Device]-->

Check if globalvalue has a value

<!--@If Defined(@Global:Device.Is[Device])--> Let's output this tag here: <strong><!--@Global:Device.Is[Device]--></strong> <!--@EndIf(@Global:Device.Is[Device])-->