contentxxl – device support

13
contentXXL – Device Support

Upload: kacia

Post on 21-Jan-2016

49 views

Category:

Documents


0 download

DESCRIPTION

contentXXL – Device Support. contentXXL Device Support. Overview Configuration How it is implemented 4. Customization 5. Limitations. 1. Overview. Device Support means content is displayed different depending on the device which is used - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: contentXXL – Device Support

contentXXL – Device Support

Page 2: contentXXL – Device Support

contentXXL Device Support

1. Overview

2. Configuration

3. How it is implemented

4. Customization

5. Limitations

Page 3: contentXXL – Device Support

1. Overview

Device Support means

content is displayed different depending on the device which is used

This is done by applying another set of templates for a specific device

Standard device: Webbrowser (must not be configured)

In this paper we will focus on using this feature for displaying a text-only version.

Other devices can be supported in the same way.

Page 4: contentXXL – Device Support

2. Configuration

How to register a device

A device is identified by base url only. There is no other identification included (but you can write your own one and redirect to base url)

Create a new entry in the table ‘PortalSettings’ with a settingskey ‘device’ and a settingsvalue like ‘url=yourdomain.com;device=textonly;‘ (this url must be registered as baseurl as well)

In the global.asax the current device is recognized from the baseurl in the Application_BeginRequest eventhandler

Context.Items("currentDevice") is set (in our case context.items(“currentDevice“) = „textonly“)You can use this value to implement device specific logic in templates

Page 5: contentXXL – Device Support

2. Configuration

Pagetemplate:

Any device must have a default pagetemplate in the shadow-folder:

Name convention is <device>.ascx (e.g. textonly.ascx)

Otherwise the ‚Device not supported‘ message appears

Special pagetemplates may be placed in pagetemplates/textonly/

e.g. pagetemplates/textonly/myspecialtemplate.ascx is the textonly template for

pagetemplates/myspecialtemplate.ascx (this is not mandatory).

Page 6: contentXXL – Device Support

2. Configuration

How to apply a special set of templates for a device

This is done in the module settings manager by creating a standard modulesettings template

with output for this device and the specific settings:

The templatesconfigured hereare applied forany module ofthis object typewhen textonlymode is active

Page 7: contentXXL – Device Support

3. How it is implemented

Database:

‚ModuleSettingsTemplate‘ contains device information

settings are stored in ‚ModuleInstance‘and‚ModuleSettings‘

Page 8: contentXXL – Device Support

3. How it is implemented

• Class PageTemplateHelper

is called from desktopdefault.aspx

handles device information

Most important method:CreateLayout()returns LayoutInfo object

properties • TextOnlyTemplateName()• IsTextOnlyMode()are legacy from contentXXL 2.54

now the more general device concept is followed

Page 9: contentXXL – Device Support

3. How it is implemented

• Class Layoutinfo

provides path to pagetemplate

Page 10: contentXXL – Device Support

3. How it is implemented

• Class ModuleSettingsDeviceValidator

called from ModuleInstanceInfo instance

ValidateCustomSettings(ByVal moduleID As Integer, ByVal device As String, ByVal portalID As Integer, ByRef customSettings As ModuleCustomSettingsCollection)

fills ModuleCustomSettingsCollection with default device custom settings

ValidateInstance(ByVal moduleID As Integer, ByVal device As String, ByVal portalID As Integer, ByRef instance As ModuleInstanceInfo)

provides default device general settings

Page 11: contentXXL – Device Support

4. Customization

File customsettingsmap.xml in plugin folder maps module custom settings with standard device modulesettingstemplate custom settings and can be overwritten in the shadow-folder

Example:

<?xml version="1.0" encoding="UTF-8"?>

<customSettings>

<setting key="articletemplate" type="template" />

<setting key="printtemplate" type="template" />

<setting key="bigitemtemplate" type="template" />

<setting key="bigitemalttemplate" type="template" />

<setting key="smallitemtemplate" type="template" />

<setting key="smallitemalttemplate" type="template" />

<setting key="headertemplate" type="template" />

<setting key="footertemplate" type="template" />

</customSettings>

In device mode the templates defined in the setting nodes are applied from the

modulesettingstemplate, other custom settings (like No. preview) are module specific.

Page 12: contentXXL – Device Support

4. Limitations

inherent to this concept all modules of the same type are rendered with the same templates

(no flexibility)

device support is not implemented for Search and Navigation

(due to a different handling of module settings regarding templates in these modules)

device support is has nothing to do with .NET Mobile Extensions or other Frameworks, that support devices.

text-only version is (in Germany) not accepted as barrier-free version for handycaped people.

Page 13: contentXXL – Device Support

Thank you!

contentXXL