Device profiles in Kentico CMS allow you to customize the layout and content of pages according to the specific devices that visitors use to view the pages. To start using device profiles, enable them in the settings first.
1. Open Site Manager and navigate to Settings -> Content -> Content management.
2. (Optional) Select a site where you want to enable device profiles.
3. In the Mobile development section, check the Enable device profiles setting.
4. Click Save.
With device profiles enabled, the system evaluates whether the device that is requesting a page belongs to one of the device profiles defined in Site Manager -> Development -> Device profiles. See Creating device profiles for details.
By default, Kentico CMS only detects a limited set of mobile devices. The basic detection uses XML data stored in the ~/App_Data/CMSModules/DeviceProfile/devices.xml file, which contains information about specific devices.
Each device has a set of properties describing its capabilities and a list of user agents used for identification. For example:
<Device name="Nokia_710" displayname="Nokia - 710" width="480" height="800" mobile="true">
You can manually expand the data by adding devices and their user agents. The system reloads the data every time the application starts, so you need to restart the application for changes to take effect.
When creating device profiles, you can assign the devices from the XML file using the device selector.
The 51degrees.mobi mobile device detection software integrated into Kentico CMS allows you to extend the detection data to include all devices that are available on the market. The data also provides access to all device properties (listed in the device macro reference).
To use this data, you need to obtain a license from 51degrees.mobi and register it within Kentico CMS.
1. Buy a license for Premium Data at 51degrees.mobi. You will receive either a license key that enables you to download device data automatically, or a data file that you need to manually upload into the system.
2. Go to Site Manager -> Settings -> Integration -> 51degrees.mobi.
3. Enter your 51degrees.mobi license key into the text box and click Activate, or select a data file from your disk and click Upload.
4. Click Save.
The system now has access to the 51degrees.mobi mobile device data set. You can select devices directly from the device selector when creating device profiles and you can access additional device properties within the CurrentDevice object.