7 Native Documents and Conversion

This section covers the following topics:

7.1 About Native Documents

Native documents are a part of many Web sites. While many native documents are typically word processing or documents for presentations, native documents can be most any type of document.

When placed in a Web site, the native documents are converted to a string of HTML, and inserted in the region template.

7.2 wcmDynamicConversion

The wcmDynamicConversion method uses Dynamic Converter to convert the document into HTML so that it can be viewed on the web site.

Note that if you are using Native Docs with the WCM_PLACEHOLDER service then the wcmDynamicConversion tag on the Region Template must specify the dDocName of the conversions definition file as follows:

<!--$wcmDynamicConversion("rule1","dataFileDocName=myNativeDoc","pageNum=2",
    "conversionsDefinitionDocName=convDefDocName")-->
<!--$wcmDynamicConversion("rule1","dataFileDocName=myNativeDoc","pageNum=2",
    "conversionsDefinitionDocName=convDefDocName", "conversionType="simple")-->

7.3 Document Conversion in the Properties Pane

Document conversion must be listed in the properties pane. The most common reason that a native document doesn't convert as expected is because the conversion isn't properly listed.

In Designer, the conversion definition is found in the first section of the properties pane. Select an item in the site hierarchy. The conversion must be listed there to work.

However, if wcmDynamicConversion is used, then the item listed in the conversion definition in the panel will not be used. The wcmDynamicConversion tag allows you to explicitly state the rule. When you associate a dynamic conversion with a region definition and region template (rather than explicitly coding it), the conversion must be stated in the properties pane. When you use wcmDynamicConversion, this is not necessary as you are explicitly stating the rule you wish to use. You can even use a rule not stated in the dynamic conversion listed in the conversion definition in the properties pane.

For more information, see the User's Guide for Site Studio Designer.

7.4 Common Errors Using Native Documentation

Generally native documents are easy to implement in Site Studio. Site Studio is constructed so that all of your conversion rules are contained in one conversion definition. It is not recommended to keep different conversion files for different rules; all rules should be listed in one conversion definition.

This definition should be listed in the Conversions Definition property in the properties pane for the Web site. Not listing the conversions definition here is the most common reason for native documents not appearing as expected in a Web site. This is true even if you use the WCM_PLACEHOLDER Idoc script extension to explicitly state the conversion rule.