You can create a snippet, which is a template that contains
only the elements you want to reuse in other templates. You might
create a header snippet or a footer snippet, for example. This task
outlines creating a header snippet. After you create a snippet, save
it to the Central Management component to make it accessible to other
users and to add it to the Palette view.
About this task
There are snippets provided for
you with the Rational® Publishing Engine installation
in the Central Management component and in the %RPE_HOME%\utils\snippets directory.
You
can create a snippet for any sections of a document. This task provides
an example header for you to use as one type of snippet.
Other
snippets you might create:
Procedure
To create an example header:
- From the Outline view, drag the master page into an element
in the template editor.
- In the Master Page tab of the editor, add the
Paragraph element
to the Header.
- In the paragraph, insert two
Text elements.
- Double-click the first text element and enter Document
Title: . Include a space after the text.
- Double-click the second text element and enter Section
Title.
- Select the paragraph element to add formatting in the Properties
view:
- Select the Border tab.
- Select the
icon to apply formatting to a border that displays
under the element.
- For the Margin, enter 10.
This selection places the border line 10 pixels away from the text.
- For the Style, select single.
This selection creates a single line below the paragraph element.
- For the Width, enter 1.
This selection makes the border 1 pixel wide.
- Select the first text element to add formatting in the
Properties view:
- Select the Font tab.
- Click the
icon. The Set bold value window
opens.
- Select true and click OK.
- Save the changes.
Example
Template example:
Output example:
What to do next
Save the template in the Central Management component with
the Snippets category type. Snippets that are stored in the Central
Management component are added to the Palette view.