ShowTable of Contents
MPA 8.0 comes with an out of box feature for converting the WCM RichText content to equivalent XDIME content which can be rendered on to any mobile devices in a rich content way. The component is called WCM Mobile Content Enabler.
This document assumes you have a working Mobile Portal Accelerator 8.0 and IBM Lotus Web Content Management environment, and that you have created the Authoring and Presentation Templates, Menus, Workflow, and Site Areas described in End-to-End Content in WebSphere Portal using Web Content Management 6.0
To test this use mobile simulators or firefox add-on called User-Agent-Switcher to simulate mobile device requests.
MCE has the following two content conversion utilities.
1) WCMMobileContentConversion Portlet
- This is a portlet based utility that comes installed with the Mobile Portal Accelerator setup. This portlet can be added to any portal page and same can be used for Rich text conversion of all changed contents of WCM library in one go with some changes to existing libraries' Authoring template, Presentation template, & content data.
2) MobileContent WorkFlow Action
- The custom workflow action which gets added after installing this EAR file can be used to convert rich text of a single content in a WCM workflow. This can be achieved by adding custom workflow action in a workflow stage & adding this workflow stage in a standard workflow.
The Conversion is performed using the XSLT Transformation. The XSLT files are located within the installedApps/MPATheme.ear/MPATheme.war/ directory. This contains both XDIME1 & XDIME2 based XSLT, from file name remove _XDIME1 or _XDIME2 for using the transformation. The same XSLT can be modified to enhance the styling of the rich text suitable for the mobile rendering.
Method 1 : Using WCM Mobile Content Conversion Portlet
Before using this portlet make changes to your WCM library.
1. Edit your existing authoring template (for e.g. SC AT NEWS) by going to Element Manager & add the following Element types:
Note: For each Rich Text element in your content for e.g. consider SC Body there should be a corresponding HTML element with same name & with suffix _m so for Rich Text SC Body create a HTML element with name SC Body_m.
The other 4 elements namely XSLT Directory, WCM Context, Content Element Suffix, & Last Conversion Date needs to be created exactly with same name & with same element type as shown below
2. Create the content with exactly same name as in the following screen-shot & while creating it, apply the above authoring template (SC AT News) in which you added the required elements. Specify the values for each element in this content according to your settings as follows
Content Element Suffix
Last Conversion Date
With current date & time
3. Save & approve this content
WCM CONTEXT & SUFFIX
LAST CONVERSION DATE
3. Add your own content which has rich text in it & which you want to display on the mobile simulator as follows:
Following shows the sample Richtext content created
After the conversion it looks as follows (the XDIME Equivalent of RichText)
4. Save & approve this content so that it is published.
5. Add the Mobile Content Conversion portlet to any Portal page (say MCE) & access it.
6. Using the portlet - from the drop-down list, select Myshowcase library & click on Submit button as shown in the below screenshots. You will be directed to the next page which will show a detailed report on number of contents which are changed in this library from last conversion date & how many rich text element present & how many are transformed.
Verify the transformed content under SC Body_m element of your content as shown below
7. Modify the presentation template such that it is having reference to HTML element i.e., in our case SC Body_m & not the rich text element SC Body as shown in the following screen-shot
7. Create a XDIME page say WCM_Page with XDIME markup enabled & add local rendering portlet (which is pre-installed as part of Portal install) to this page & then go to Edit Shared Settings of this portlet on the WCM_Page & select your content & the presentation template as shown in the following screen-shot
8. Render the WCM_Page & then local rendering portlet (Web Content Viewer (JSR 286)) from a mobile simulator & verify that the rich text contents are displayed properly as shown in following screenshot
Method 2 : Using WCM Custom Workflow Action
1. On WAS admin console, install the EAR file MobileContentWFAction.ear from the (installableApps of MPA) by selecting the default path & values.
2. Next edit the MyShowcase library & create a new custom action as shown in the following screenshot & make sure to select the Action -> Mobile Content Custom WorkFlow Action Factory - Convert Content Action"
3. Select Action as follows
3. Click on Save & Read & then Save & Close option.
4. Next create a workflow stage & select the action which you created in the previous step under Run on Entering Stage section as shown in the below screen-shot
Click on Save & Read & then Save & Close option.
5. Next edit the existing Standard workflow & add the above workflow stage (SC Stage MPA) which you created in the previous step after SC Stage Draft as shown in the below screenshot and Save.
6. Now this custom workflow is ready to be used on any existing content or new content.
- Now the new content will be in Draft stage once you start creating the content & once you are done with drafting & once you click on Save & Approve button, you can see that your rich text content under SC Body is converted & written under SC Body_m HTML element section. Again Click on Save & Approve so as to publish the content to render on simulators.
- For existing content, go to that content & click on More Actions Restart Workflow as shown in Screenshot below.The content will be moved to draft stage & click on Edit button & can make changes to your rich text content. Click on Save & Approve button & this will transform your rich text content (SC Body) & will write the transformed content under HTML element section (SC Body_m) as shown in Screenshot below.
7. Make changes to your presentation template such that it is having reference to HTML element i.e., in our case SC Body_m & not the rich text element SC Body as shown in the following screenshot and follow the same procedure shown in the Method#1 to reach the mobile rendering the richtext.
Nataraj Shivashankaraiah has been with IBM for over 5 years & has specialized on the usage of software products such as WebSphere Portal, MPA, WCM, Testing methodologies, RPT, RFT, & other automation tools. He can reach at email@example.com.
Krishna C Kumar is based at IBM's India Software Lab, works as a product developer/technical support specialist for IBM Mobile Portal Accelerator Team. His technical expertise includes Mobile Portal, WebSphere Portal, WCM and MPA. He can be reached at firstname.lastname@example.org
 End-to-End Content in WebSphere Portal using Web Content Management 6.0
 WCM Mobile Content Conversion portlet - IBM Mobile Portal Accelerator 8.0 Product Documentation.