HTML Conversion Templates 5-21
7. In the Template Editor, click Change Preview to select a source document by
content ID to preview your template with.
8.
Re-create the settings from your previous script template using the Template Editor see
Classic HTML Conversion Template Editor on page 5-9. This will
likely be the most time-consuming part of the migration process. You may want to open another web browser and preview a dynamically converted document that
used the previous template, so that you can compare the templates as you work. Click OK to close the Template Editor when you are finished making changes.
9. Enter the content ID of your previous script template in the Layout field so that
you can turn a former script template into a layout template that is used with the Classic HTML Conversion template.
10. Click Update to associate your new Classic HTML Conversion template and
layout template with your template selection rule.
11.
Search for the layout template former script template in the Content Server, check it out, and open it in a text editor.
Make the following changes:
■
Insert the following token at the top of your file, before the first HTML tag: --TRANSIT - CUSTOMLAYOUTTOP--
■
Insert the following token between the HTML HEAD tags: --TRANSIT - CUSTOMLAYOUTHEAD--
■
Insert the following token in the HTML BODY tag:: TRANSIT-BODYATTRIBUTES
■
Replace your existing Insert Body Element tag with the following token this token will replace most of your previous element settings:
-- TRANSIT - CUSTOMLAYOUTBODY --
■
Remove all references to elements, macros, pragmas, and indexes.
■
Leave Idoc Script tags in place those that call outside files or services.
12.
Save your new layout template and check it into the Content Server.
5.3.3.2 Sample of Newly Converted Template From a Pre-6.0 Version
To update an earlier Dynamic Converter script template prior to version 6.0 to the current version Classic HTML Conversion template, you will need to recreate your
original template settings in the Template Editor see Classic HTML Conversion
Template Editor on page 5-9 and then turn your previous script template into a
layout template. While all Idoc Script tags can remain, you will need to remove the syntax for elements, macros, pragmas, and indexes. These values are replaced with
template tokens, in particular the CUSTOMLAYOUTBODY token, which represents nearly all of the settings made in the Template Editor.
The following example illustrates a very simple script template created in an earlier version of Dynamic Converter prior to version 6.0 that is turned into a layout
Note: Unlike script templates, layout templates in the Content Server
do not require the HCST file extension.
5-22 Administrators Guide for Dynamic Converter
template in the current version. All element formatting, of course, must be recreated in the new Template Editor. Bold text indicates a tag that is replaced.
Example 5–1 Original Script Template Example
html head
title { insert element=property.title suppress=tags}
title defaultPageTitle=Converted Content
include std_html_head_declarations head
body include body_def
include std_page_begin include std_header
table border=0 cellpadding=0 cellspacing=0 width=100 trtd
{ INSERT ELEMENT=Property.Title} tdtr
trtd { INSERT ELEMENT=Body}
tdtr
table include std_page_end
body html
Example 5–2 Migrated Layout Template Example
-- TRANSIT - CUSTOMLAYOUTTOP -- html
head -- TRANSIT - CUSTOMLAYOUTHEAD --
defaultPageTitle=Converted Content include std_html_head_declarations
head body TRANSIT-BODYATTRIBUTES
include body_def include std_page_begin
include std_header table border=0 cellpadding=0 cellspacing=0 width=100
trtd -- TRANSIT - CUSTOMLAYOUTBODY --
tdtr table
include std_page_end body
html
6
Classic HTML Conversion Layout Templates 6-1
6
Classic HTML Conversion Layout Templates
This section covers the following topics:
■
About Classic HTML Conversion Layout Templates on page 6-1