device

device

getDeviceType()

Returns the device type string

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

Arguments

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

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

Arguments

NameTypeRequiredDefaultOptionsDescription
None
NameTypeRequiredDefaultOptionsDescription
typenamestringYes
webskinstringYes
deviceTypestringNo#getDeviceType()#
bIgnoreDeviceDetectionstringNofalse

getDeviceWebskinNames()

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

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

Arguments

NameTypeRequiredDefaultOptionsDescription
deviceTypestringNo#getDeviceType()#
bIgnoreDeviceDetectionstringNofalse

getDomainDeviceType()

Returns the device type for the current domain

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

Arguments

NameTypeRequiredDefaultOptionsDescription
domainstringNo

getUserAgentDeviceType()

Returns the device type string based on the user agent

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

Arguments

NameTypeRequiredDefaultOptionsDescription
userAgentstringNo#cgi.user_agent#

isDesktopDevice()

Returns true if the device type is desktop

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

Arguments

NameTypeRequiredDefaultOptionsDescription
deviceTypestringNo#getDeviceType()#

isDeviceDetectionEnabled()

Returns true if device detection is enabled

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

Arguments

isDeviceRedirectionEnabled()

Returns true if device redirection between device specific domains is enabled

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

Arguments

NameTypeRequiredDefaultOptionsDescription
None

isDeviceWebskinsEnabled()

Returns true if the given device types webskins are enabled

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

Arguments

NameTypeRequiredDefaultOptionsDescription
None
NameTypeRequiredDefaultOptionsDescription
deviceTypestringYes

isMobileDevice()

Returns true if the device type is mobile

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

Arguments

NameTypeRequiredDefaultOptionsDescription
deviceTypestringNo#getDeviceType()#

isMobileWebskinsEnabled()

Returns true if mobile webskins are enabled

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

Arguments

isTabletDevice()

Returns true if the device type is tablet

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

Arguments

NameTypeRequiredDefaultOptionsDescription
None
NameTypeRequiredDefaultOptionsDescription
deviceTypestringNo#getDeviceType()#

isTabletWebskinsEnabled()

Returns true if tablet webskins are enabled

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

Arguments

redirectDevice()

Redirects to the appropriate domain for the current device type

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

Arguments

NameTypeRequiredDefaultOptionsDescription
None

setDeviceType()

Sets the device type string

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

Arguments

NameTypeRequiredDefaultOptionsDescription
None
NameTypeRequiredDefaultOptionsDescription
deviceTypestringYes