device

device

device

Metadata

getDeviceType()

Returns the device type string

Examples

Get the device type string:
<cfoutput>#application.fapi.getDeviceType()#</cfoutput>

Arguments

Name Type Required Default Options Description
None

getDeviceWebskin()

Returns the device specific webskin for the given typename and display method and optionally allows the device type to be specified instead of being automatically detected

Examples

Get the device specific webskin for the given typename and display method webskin:
<cfoutput>#application.fapi.getDeviceWebskin("dmHTML", "displayPageHome")#</cfoutput>

Arguments

Name Type Required Default Options Description
typename string Yes
webskin string Yes
deviceType string No [runtime expression]
bIgnoreDeviceDetection string No false

getDeviceWebskinNames()

Returns a struct of the standard webskin names to be used for the given device type

Examples

Get the standard webskin names used by a certain device type:
<cfoutput>#application.fapi.getDeviceWebskinNames("mobile")#</cfoutput>

Arguments

Name Type Required Default Options Description
deviceType string No [runtime expression]
bIgnoreDeviceDetection string No false

getDomainDeviceType()

Returns the device type for the current domain

Examples

Get the device type for the current domain:
<cfoutput>#application.fapi.getDomainDeviceType()#</cfoutput>

Arguments

Name Type Required Default Options Description
domain string No

getUserAgentDeviceType()

Returns the device type string based on the user agent

Examples

Get the device type string from the user agent:
<cfoutput>#application.fapi.getUserAgentDeviceType()#</cfoutput>

Arguments

Name Type Required Default Options Description
userAgent string No [runtime expression]

isDesktopDevice()

Returns true if the device type is desktop

Examples

Check for a desktop device:
<cfoutput>#application.fapi.isDesktopDevice()#</cfoutput>

Arguments

Name Type Required Default Options Description
deviceType string No [runtime expression]

isDeviceDetectionEnabled()

Returns true if device detection is enabled

Examples

Check if device detection is enabled:
<cfoutput>#application.fapi.isDeviceDetectionEnabled()#</cfoutput>

Arguments

Name Type Required Default Options Description
None

isDeviceRedirectionEnabled()

Returns true if device redirection between device specific domains is enabled

Examples

Check if device redirection to a particular domain is enabled:
<cfoutput>#application.fapi.isDeviceRedirectionEnabled()#</cfoutput>

Arguments

Name Type Required Default Options Description
None

isDeviceWebskinsEnabled()

Returns true if the given device types webskins are enabled

Examples

Check if the given device types webskins are enabled:
<cfoutput>#application.fapi.isDeviceWebskinsEnabled("tablet")#</cfoutput>

Arguments

Name Type Required Default Options Description
deviceType String Yes

isMobileDevice()

Returns true if the device type is mobile

Examples

Check for a mobile device:
<cfoutput>#application.fapi.isMobileDevice()#</cfoutput>

Arguments

Name Type Required Default Options Description
deviceType string No [runtime expression]

isMobileWebskinsEnabled()

Returns true if mobile webskins are enabled

Examples

Check if mobile webskins are enabled:
<cfoutput>#application.fapi.isMobileWebskinsEnabled()#</cfoutput>

Arguments

Name Type Required Default Options Description
None

isTabletDevice()

Returns true if the device type is tablet

Examples

Check for a tablet device:
<cfoutput>#application.fapi.isTabletDevice()#</cfoutput>

Arguments

Name Type Required Default Options Description
deviceType string No [runtime expression]

isTabletWebskinsEnabled()

Returns true if tablet webskins are enabled

Examples

Check if tablet webskins are enabled:
<cfoutput>#application.fapi.isTabletWebskinsEnabled()#</cfoutput>

Arguments

Name Type Required Default Options Description
None

redirectDevice()

Redirects to the appropriate domain for the current device type

Examples

Redirect to the appropriate domain for the current device type:
<cfset application.fapi.redirectDevice()>

Arguments

Name Type Required Default Options Description
None

setDeviceType()

Sets the device type string

Examples

Set the device type string:
<cfoutput>#application.fapi.setDeviceType("mobile")#</cfoutput>

Arguments

Name Type Required Default Options Description
deviceType string Yes