content XXL Device Support content XXL Device Support

  • Slides: 13
Download presentation
content. XXL – Device Support

content. XXL – Device Support

content. XXL Device Support 1. Overview 2. Configuration 3. How it is implemented 4.

content. XXL Device Support 1. Overview 2. Configuration 3. How it is implemented 4. Customization 5. Limitations

1. Overview Device Support means § content is displayed different depending on the device

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.

2. Configuration § How to register a device A device is identified by base

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 ‘Portal. Settings’ 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_Begin. Request eventhandler Context. Items("current. Device") is set (in our case context. items(“current. Device“) = „textonly“) You can use this value to implement device specific logic in templates

2. Configuration § Pagetemplate: Any device must have a default pagetemplate in the shadow-folder:

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).

2. Configuration § How to apply a special set of templates for a device

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 templates configured here applied for any module of this object type when textonly mode is active

3. How it is implemented Database: ‚Module. Settings. Template‘ contains device information settings are

3. How it is implemented Database: ‚Module. Settings. Template‘ contains device information settings are stored in ‚Module. Instance‘ and ‚Module. Settings‘

3. How it is implemented • Class Page. Template. Helper is called from desktopdefault.

3. How it is implemented • Class Page. Template. Helper is called from desktopdefault. aspx handles device information Most important method: Create. Layout() returns Layout. Info object properties • Text. Only. Template. Name() • Is. Text. Only. Mode() are legacy from content. XXL 2. 54 now the more general device concept is followed

3. How it is implemented • Class Layoutinfo provides path to pagetemplate

3. How it is implemented • Class Layoutinfo provides path to pagetemplate

3. How it is implemented • Class Module. Settings. Device. Validator called from Module.

3. How it is implemented • Class Module. Settings. Device. Validator called from Module. Instance. Info instance Validate. Custom. Settings (By. Val module. ID As Integer, By. Val device As String, By. Val portal. ID As Integer, By. Ref custom. Settings As Module. Custom. Settings. Collection) fills Module. Custom. Settings. Collection with default device custom settings Validate. Instance(By. Val module. ID As Integer, By. Val device As String, By. Val portal. ID As Integer, By. Ref instance As Module. Instance. Info) provides default device general settings

4. Customization File customsettingsmap. xml in plugin folder maps module custom settings with standard

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"? > <custom. Settings> <setting key="articletemplate" type="template" /> <setting key="printtemplate" type="template" /> <setting key="bigitemalttemplate" type="template" /> <setting key="smallitemalttemplate" type="template" /> <setting key="headertemplate" type="template" /> <setting key="footertemplate" type="template" /> </custom. Settings> In device mode the templates defined in the setting nodes are applied from the modulesettingstemplate, other custom settings (like No. preview) are module specific.

4. Limitations § inherent to this concept all modules of the same type are

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.

content. XXL Thank you!

content. XXL Thank you!