Choosing a Template for a Rule About Templates Template Types

Template Rules 3-3

3.3 Assigning Metadata Criteria to a Rule

When assigning conversion templates to content items, you need to make sure that the metadata specified here matches the metadata assigned to your source documents. You can verify this by opening the content information page for your source documents in the Content Server. To assign metadata to a template selection rule, complete these steps: 1. Open the Dynamic Converter Admin page see Dynamic Converter Admin Page on page A-1.

2. Click Template Selection Rules.

The Template Selection Rules page is displayed see Template Selection Rules Page on page A-9.

3. Choose a metadata field from the first Field list under the Criteria for selected

rule heading. You may choose Type, Author, Title, Content ID, Title, or a number of other fields.

4. In the Value text box, enter the metadata that you would like your rule to target.

You can select the metadata value from the menu to the right of the Value text box. You can also use wildcards to specify a metadata value. 5. If desired, choose a second and third metadata field for your rule. There will always be an AND relationship between the metadata fields, which means that only those content items that meet all criteria are converted by this rule. The maximum number of criteria that you can specify for each rule is controlled by a setting on the Dynamic Converter Configuration Page see Dynamic Converter Configuration Page on page A-2.

6. Click Update on the bottom of the Template Selection Rules page to update your

rule.

3.4 Choosing a Template for a Rule

Your template selection rule is not complete until you choose a template for the rule. The template will ultimately drive the appearance of your converted documents. To assign a template to a rule, complete these steps: 1. Open the Dynamic Converter Admin page see Dynamic Converter Admin Page on page A-1.

2. Click Template Selection Rules.

The Template Selection Rules page is displayed see Template Selection Rules Page on page A-9.

3. Enter the content ID for the template in the Template text box under the

Template and layout for selected rule heading. You can select a type of template HTML Conversion, Classic HTML Conversion, or Script from the Template Types menu, and then you can select your desired template from the Available Templates menu. 4. If you chose a Classic HTML Conversion template in the previous step, you may want to complement it with a layout template. If so, enter the content ID for the 3-4 Administrators Guide for Dynamic Converter layout template in the Layout text box again, you may select the layout template from the Available Layouts menu.

5. Click Update to add the template to your rule.

Once you have created a template selection rule, assigned the appropriate metadata criteria to it, and selected a template or templates for the rule, you should verify your configuration settings on the Dynamic Converter Configuration page see Dynamic Converter Configuration Page on page A-2. In particular, make sure that you have added the necessary file types to the Conversion Formats list. See Chapter 4, Conversion Templates for more information about templates. 4 Conversion Templates 4-1 4 Conversion Templates This section covers the following topics: ■ About Templates on page 4-1 ■ Template Types on page 4-1 ■ Template Strategy on page 4-2 ■ Checking In a Template on page 4-2 See also: ■ Chapter 5, HTML Conversion Templates ■ Chapter 6, Classic HTML Conversion Layout Templates ■ Chapter 7, Script Templates

4.1 About Templates

Much of the power, flexibility, and complexity of Dynamic Converter is bound up in its use of templates to drive the conversion process. Templates give you immense control over the visual and navigational properties of the converted web page. A template is a plain-text HTML or XML file that may include special tags which allow template writers to insert, repeat through, condition on, and link to various elements in the source document. You can associate these sets of formatting instructions with one or multiple content items that are stored in the Content Server. When you assign a template to your content items on the Template Selection Rules page see Template Selection Rules Page on page A-9, you are controlling the way your content items will appear as web pages. When users click the HTML link generated by Dynamic Converter for a content item, a dynamic conversion takes place using the template associated with that content item see Dynamic Converter Process on page 1-2.

4.2 Template Types

There are four types of templates available in Dynamic Converter: ■ Classic HTML Conversion templates : Classic HTML Conversion templates formerly known as GUI templates are written in XML Extensible Markup Language and are designed for use with the Dynamic Converter Classic HTML Conversion Editor. You can use the Classic HTML Conversion Editor to make changes in these templates and view them in real time. Classic HTML Conversion 4-2 Administrators Guide for Dynamic Converter templates have the .ttp file extension. See Chapter 5, HTML Conversion Templates for more information. ■ HTML Conversion templates : The HTML Conversion Editor’s primary goal is producing faithful representations of source files using the HTML, GIF, JPEG, and PNG formats. Using a C API and a powerful, customizable XML file, you can use the HTML Conversion Editor to set various options that affect the content and structure of the output. The HTML Conversion Editor is Java-based and can run in any browser instance where a JRE is present. See Chapter 5, HTML Conversion Templates for more information. ■ Classic HTML Conversion Layout templates : Layout templates are designed to complement GUI templates in that they control the overall page layout for converted content items. A layout template can be used to create a common set of borders, site navigation, or a company logo on each converted web page. It can also be used to maintain the Content Server look and feel with links to Home, Search, etc. Layout templates typically contain HTML code especially HTML tables, tokens which represent GUI template settings, and Idoc Script or a different scripting language. See Chapter 6, Classic HTML Conversion Layout Templates for more information. ■ Script templates : Script templates are text-based conversion templates that apply a set of scripted rules to your converted documents. They are plain-text files that must be hand-coded with elements, indexes, macros, pragmas, and Idoc Script. Changing script templates requires a knowledge of the language that they were written in. Script templates have the .hcst file extension. See Chapter 7, Script Templates for more information. For more information on the differences between HTML Conversion templates and script templates, as well as suggestions for migrating, see Migrating From Script Templates to Classic HTML Conversion Templates on page 5-19.

4.3 Template Strategy