device
device
- getDeviceType
- getDeviceWebskin
- getDeviceWebskinNames
- getDomainDeviceType
- getUserAgentDeviceType
- isDesktopDevice
- isDeviceDetectionEnabled
- isDeviceRedirectionEnabled
- isDeviceWebskinsEnabled
- isMobileDevice
- isMobileWebskinsEnabled
- isTabletDevice
- isTabletWebskinsEnabled
- redirectDevice
- setDeviceType
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
Name | Type | Required | Default | Options | Description |
---|---|---|---|---|---|
None |
Name | Type | Required | Default | Options | Description |
---|---|---|---|---|---|
typename | string | Yes | |||
webskin | string | Yes | |||
deviceType | string | No | #getDeviceType()# | ||
bIgnoreDeviceDetection | string | No | false |
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
Name | Type | Required | Default | Options | Description |
---|---|---|---|---|---|
deviceType | string | No | #getDeviceType()# | ||
bIgnoreDeviceDetection | string | No | false |
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
Name | Type | Required | Default | Options | Description |
---|---|---|---|---|---|
domain | string | No |
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
Name | Type | Required | Default | Options | Description |
---|---|---|---|---|---|
userAgent | string | No | #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
Name | Type | Required | Default | Options | Description |
---|---|---|---|---|---|
deviceType | string | No | #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
Name | Type | Required | Default | Options | Description |
---|---|---|---|---|---|
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
Name | Type | Required | Default | Options | Description |
---|---|---|---|---|---|
None |
Name | Type | Required | Default | Options | Description |
---|---|---|---|---|---|
deviceType | string | Yes |
isMobileDevice()
Returns true if the device type is mobile
Check for a mobile device:
- <cfoutput>#application.fc.lib.device.isMobileDevice()#</cfoutput>
Arguments
Name | Type | Required | Default | Options | Description |
---|---|---|---|---|---|
deviceType | string | No | #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
Name | Type | Required | Default | Options | Description |
---|---|---|---|---|---|
None |
Name | Type | Required | Default | Options | Description |
---|---|---|---|---|---|
deviceType | string | No | #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
Name | Type | Required | Default | Options | Description |
---|---|---|---|---|---|
None |
setDeviceType()
Sets the device type string
Set the device type string:
- <cfoutput>#application.fc.lib.device.setDeviceType("mobile")#</cfoutput>
Arguments
Name | Type | Required | Default | Options | Description |
---|---|---|---|---|---|
None |
Name | Type | Required | Default | Options | Description |
---|---|---|---|---|---|
deviceType | string | Yes |