You can render data inside master pages in Rational® Publishing Engine.
When designing a master ensure that the data attributes are available.
Although data attributes cannot be used inside a master page element,
you can use variables to hold your data.
Before you begin
Create an internal variable and assign a data value to the
newly created variable. Internal variables are used for calculations
and are not displayed in the document specification. See
Defining and assigning variables for
more information.
About this task
You cannot add queries to a master page.
Procedure
- In the template editor, insert a Container element.
- Right-click the Container element and select .
- Click Add.
- Select a variable and click OK.
- In the Set Assignments for Current Element window,
click the Data Expression tab.
- Select an attribute to assign to the variable and click OK.
- Add the Paragraph element after
the Container element.
- Select the Master Page from the Outline view and drag it
into the Paragraph element.
- Save the changes.
Example
Adding the name of a DOORS module to the header:
- Add a DOORS data source schema.
- Create a new container in template and assign the module query
in the container element. When you assign to template elements, you
can use all the attributes of the elements returned by the queries.
- In the container element right-click and select . Select the variable and go to Data Expression in
the Set Assignments for Current Element and
assign to the variable the module.Name attribute.
- As a result the _documentTitle variable holds
the module name. In the master page, add a text element and set the
variable as value in the location where you want to display the name
of the module. You must assign the master page to an element in document
template. This element should be placed after the container with variable
assignment.