Flamingo.Device.isDesktop()

The isDesktop() method is used to detect if the user device is a desktop PC or not. It returns TRUE if user device is detected as a desktop computer and FALSE otherwise.

Syntax

Flamingo.Device.isDesktop()

Parameters

None.

Return Value

TYPE DESCRIPTION
Boolean TRUE if user device is detected as desktop and FALSE otherwise.

Example

You can use the following code in template to display “IT’S A DESKTOP!” in case user opened a page on a PC and display “NOT A DESKTOP” otherwise:

<!--{if Flamingo.Device.isDesktop() }-->
 IT'S A DESKTOP!
<!--{else}-->
 NOT A DESKTOP
<!--{/if}-->

If user opened page on desktop, the result will be:

IT'S A DESKTOP!

See also