Flamingo.Device.isPhone()¶
The isPhone() method is used to detect if the user device is smartphone or not. It returns TRUE if user device is detected as smartphone and FALSE otherwise.
Syntax¶
Flamingo.Device.isPhone()
Parameters¶
None.
Return Value¶
Type | Description |
---|---|
Boolean | TRUE if user’s device is detected as smartphone and FALSE otherwise. |
Example¶
You can use the following code in template to display “IT’S A PHONE!” in case user opened a page on smartphone and display “NOT A PHONE” otherwise:
<!--{if Flamingo.Device.isPhone() }-->
IT'S A PHONE!
<!--{else}-->
NOT A PHONE
<!--{/if}-->
If user opened page on iPhone, the result will be:
IT'S A PHONE!
See also