|
||
Device profiles in Kentico CMS allow you to customize the layout and content of pages according to the parameters of the devices that visitors use to view the pages. Before you start using device profiles, enable them in the settings first.
1. Open Site Manager and navigate to Development -> Device profiles.
2. Click New profile.
3. Type the Display name of the device profile.
4. Fill in the parameters that define which devices belong to the profile. You can combine these parameters as needed.
•Devices - select devices directly from a list.
•User agents - allows you to identify devices based on user agents. The profile includes devices that contain the entered text in their user agent string. You can add multiple entries, each on a new line.
•Macro - use the macro rule designer to specify the condition that devices must meet to fit the device profile, or type in any macro condition. You can use the CurrentDevice object to retrieve data of the current device. See Device macro reference and Macro expressions documentation for more details.
5. (Optional) Set the Preview width and Preview height. The preview dimensions of the device profile determine the following:
•The maximum size of images if automatic image resizing for devices is enabled.
•The size of the displaying area when previewing pages in CMS Desk.
6. Click Save.
Once you create a device profile, it appears in the device selector in CMS Desk.
You can then select a device profile using the selector and start Creating page layouts for devices, which will be used on individual pages instead of the default layouts if the current device fits the profile. Or you can Map layouts that will replace shared layouts when the current device fits the profile.