Displaying Native Content With Site Studio 10gR4 in External Apps
By Kyle Hatlestad on Jul 21, 2009
With the release of Site Studio 10gR4, one of the major benefits is to be able to expose web content in external applications. So if you wanted a content item to be displayed in your WebCenter Interaction portal, SharePoint, PHP site, etc..., you can now easily do that. Basically, Site Studio 10gR4 added 2 new major services to UCM to allow for display and editing of content outside the context of a Site Studio site. Detailed instructions on these services are covered in a white paper available on OTN.
But one of the things that is not addressed in the white paper is how to expose regions that have dynamically converted native content. So for instance, perhaps you are presenting research findings to your website that have been authored in Word format. One of the great features of UCM is the ability to convert that document into a very clean and controlled HTML document. For more information on setting up native content in Site Studio 10gR4, there is a viewlet available.
When native content is converted and displayed within a Site Studio 10gR4 site, it needs to have a Conversion Definition applied to the site properties. This points to the Conversion Definitions rules item. This lets the region know how to convert the content. But since the WCM_PLACEHOLDER service is executed on a discreet piece of content, it doesn't have reference to a site that would define the rules. So it needs to be passed in a different way.
Normally when a dynamic conversion element is added to a Region Template, it looks like:
So in this case, the rule to use is called 'Basic'. And that rule is defined in the Conversion Definition that is tied to the site.
But if we want to use the WCM_PLACEHOLDER service to specify our content and Placeholder Definition/Region Template, then the Conversion Definition can be defined directly in the Region Template element.
The conversionsDefinitionDocName parameter defines the Content ID of the Conversion Definition object that has the 'Basic' rule defined. In addition to this parameter, there are additional parameters you can add to the wcmDynamicConversion function.
- ruleName - the name of the rule as defined in the ConversionsDefinition file. Required
- dataFileDocName - the dDocName of the native document to convert.
- pageNum - the page number within the native document to convert.
- conversionsDefinitionDocName - the dDocName of the conversion definition.
- conversionType - Possible type values = [simple|full|rule|engine|command]
- conversionTemplate - the content ID of the Template. Valid only when using conversionType="full".
- conversionLayout - the content ID of the layout. Valid only when using conversionType="full".
- conversionRuleName - the name of the rule. Valid only when using conversionType="rule".
- conversionCommand - a piece of Idoc script executed in the context of the page. Valid only when using conversionType="command".
Using the above parameters, you can go as far as defining the exact conversion rules and not need to point to a conversion definition object.