Flamingo.Device.isPlatform()

The isPlatform() method returns TRUE if the platform type specified in the method’s parameter matches the operation system used on the current device and FALSE otherwise.

Syntax

Flamingo.Device.isPlatform(platformType)

Parameters

Parameter Type Description
platformType String ’android’, ‘ios’, ‘firefoxos’, ‘windowsmobile’, ‘windows’, ‘macos’, ‘linux’

Return Value

Type Description
Boolean TRUE if the platform type specified in the method’s parameter matches the operation system used on the current device and FALSE otherwise.

Example

You can use the following code in template to display different images depending on the operation system the used device is running on:

<!--{if Flamingo.Device.isPlatform('android')}-->
    <img src="instructions-for-android.png" alt="" />
<!--{elseif Flamingo.Device.isPlatform('ios')}-->
    <img src="instructions-for-ios.png" alt="" />
<!--{elseif Flamingo.Device.isPlatform('firefoxos')}-->
    <img src="instructions-for-firefoxos.png" alt="" />
<!--{else}-->
    <img src="instructions-for-desktops.png" alt="" />
<!--{/if}-->

See also