Classic HTML Conversion Layout Templates 6-3
6.3 Tokens in Layout Templates
Tokens are placeholders or variables for the Classic HTML Conversion template settings that you create in the Template Editor. A layout template is used to control the
placement of items around your converted content. If you wanted to include a particular TOP or HEAD setting from your Classic HTML Conversion template keep
in mind that layout templates are frequently used with Classic HTML Conversion templates, this would normally require you to copy and paste the information into
your layout template in the TOP or HEAD HTML tag. With a token, you can reserve that space for a Classic HTML Conversion template setting.
There are four tokens available:
■
--TRANSIT - CUSTOMLAYOUTTOP--
Place this token at the top of the layout template before the HTML tag. Your template could replace this value with an HTML declaration, such as the W3C
document type identifier.
■
--TRANSIT - CUSTOMLAYOUTHEAD--
Place this token between the HEAD tags. Your template could replace this value with a web page title, meta tag keyword, and much more.
■
TRANSIT-BODYATTRIBUTES
Place this token in the BODY tag. Your template could replace this value with a background color, text color, link behavior, and much more.
■
-- TRANSIT - CUSTOMLAYOUTBODY --
Place this token at the location where you would like your actual content items to appear on the web page. You will likely place this somewhere in the middle of
your layout template. Your template will replace this value with each content item. This token can be used by itself to generate minimum HTML output so that
the content item can be included in another web page. See
Chapter 8, HTML Snippets
.
6.4 Sample Layout Templates
Dynamic Converter comes with a number of sample layout templates that you can check into Content Server and begin using right away.
The following sample layout templates are available:
■
default_layout.txt
■
snippet_layout.txt
6.4.1 default_layout.txt
The default_layout.txt template wraps Content Server borders and navigation around your converted documents using Idoc Script and HTML tables.
6-4 Administrators Guide for Dynamic Converter
Figure 6–3 Default Layout
The default_layout.txt layout template contains the following code: html
head -- TRANSIT - CUSTOMLAYOUTHEAD --
defaultPageTitle=Converted Content include std_html_head_declarations
head
include body_def include std_page_begin
include std_header
table border=0 cellpadding=0 cellspacing=0 width=550 trtd
-- TRANSIT - CUSTOMLAYOUTBODY -- tdtr
table include std_page_end
body html
6.4.2 snippet_layout.txt
The snippet_layout.txt template places the converted document on a web page, by itself, without the top, head, or body HTML markup. The result is very similar to what
happens when there is no layout template associated, but the advantage here is that you can easily pull this content into another web page, possibly a portal site, as an
HTML snippet.
The snippet_layout.txt layout template consists of a single line of code: -- TRANSIT - CUSTOMLAYOUTBODY --
Classic HTML Conversion Layout Templates 6-5
This is a token that displays the actual content item on the web page. Since it used by itself here, minimum HTML output is generated which can be included in another
web page or HTML snippets see Chapter 8, HTML Snippets
.
Snippet Demo The snippet_demo.hcst sample includes the basic ingredients for a portal-style web page
that draws information HTML snippets from other content items stored in the Content Server, while preserving the borders and navigation.
The snippet_demo.hcst sample contains the following code: html
head meta http-equiv=Content-Type content=texthtml; charset=iso-8859-1
titleThis is my incDynConv script test pagetitle meta name=GENERATOR content=Dynamic Converter
defaultPageTitle=Converted Content include std_html_head_declarations
head
include body_def include std_page_begin
include std_header
This is a sample page that shows how to include multiple snippets of dynamicallybr
converted content on a single page using the new Idoc function incDynamicConversion.
table border=1 cellpadding=0 cellspacing=0 width=550 tr
td incDynamicConversionsource_contentID_1,latest,template_
contentID_1,snippet_layout td
td incDynamicConversionsource_contentID_2,latest,template_
contentID_2,snippet_layout td
tr tr
td colspan=2 incDynamicConversionsource_contentID_3,latest,template_
contentID_3,snippet_layout td
tr table
include std_page_end body
html
6.5 Creating a Layout Template for Your Content Items
To create and edit a layout template, complete the following steps:
1.
Create a new layout template in a text editor or WYSIWYG tool. For information on the contents of a layout template, see
Layout Template Contents on page 6-2.
6-6 Administrators Guide for Dynamic Converter
2.
Open the Dynamic Converter Admin page see Dynamic Converter Admin Page
on page A-1.
3. Click Check In Existing Template and follow the steps to check in an existing
template see Checking In a Template
on page 4-2. Make sure that you choose
Layout Template as the template type.
4.
Return to the Dynamic Converter Admin page.
5.
Associate your layout template with a template rule see Associating a Layout
Template With a Template Rule on page 6-6.
6.6 Associating a Layout Template With a Template Rule