Device Skins
The devices available on the content preview screen are obtained from property files stored in the configuration folder of LumisXPlumisdata\config\device\previewskin.
New device skins can be added to the solution. To do this, simply create a properties file containing the information as shown in the figure below.
The example above is the configuration of an iPad Tablet from Apple.
The information contained in the file represents:
- tooltip.string: Device name. This name can be internationalized or not. If it is internationalized, it is necessary to inform the property below. This name will be displayed in the device list.
- tooltip.resource: Path of the resource that contains the translations of the internationalized strings.
- useragent: Represents the User Agent of the device to be simulated.
- width: Width in pixels of the content area (numbers only).
- height: Height in pixels of the content area (numbers only).
- type: Device type, used to define the device icon in the device list, which can be a Smartphone ("device-mobile"), Tablet ("device-tablet") or Desktop ("device-desktop", used as a default when the property is not defined).
- suportrotate: Defines whether the view can be rotated, displaying a button to rotate the view when hovering over the content preview area. (boolean value "true" or "false". If not defined, the default value is "false"). When rotating the content view, the defined proportions for the device are maintained, so that the width and height values are swapped to generate the rotation effect.
Device Lists
In certain cases, we may need to use device lists in the viewing of specific areas of the portal. Thus, for a channel that will contain content designed for mobile devices, we should have a list of mobile devices with the option of viewing in the browser omitted.
To meet this need, we have a concept of device skin lists that can be specified in an XML file stored in the directory /config/devices/previewskinlist.
Each file that specifies a list of device skins has the following format:
In an area (channel/page) of the portal, we have by default a list with all the device skins provided with the product. If it is necessary to use other lists, it is possible to specify the name of the file that represents the device skin list in the property bag "lumis.service.content.preview.skinlist".
For example, if we want a list that contains only the skins of the Smartphones provided with the product, we can specify the value of the property bag as lum_phone.
Below are the standard lists of LumisXP:
- lum_default:
- Desktops (lum_browser),
- Tablet (lum_apple_ipad),
- Mobile (lum_apple_iphone_x)
- lum_phone:
- Mobile (lum_apple_iphone_x),
- lum_tablet:
- Tablet (lum_apple_ipad)
Files with the prefix lum_ are reserved by Lumis and cannot be modified or removed. If you wish to create a list or device skin for the solution, this is possible, but do not use the prefix lum_ in your files.