Adding dynamic content to a master page

You can render data inside master pages in Rational® Publishing Engine by creating variables and assigning them attributes.

Before you begin

Create a master page:
  1. In the Outline view, right-click Master Pages and select Insert > New Master Page.
  2. Enter the name, description, orientation, and page size for the master page.
  3. Click OK to save the changes.
Create a variable for the master page:
  1. In the Outline view, right-click Variables and select Insert > New Variable.
  2. Enter the name, description, and default value.
  3. Select internal variable, so it does not appear in the output.
  4. Click OK to save the changes.
See Defining and assigning variables for more information.

About this task

You cannot add queries to a master page.

Procedure

  1. In the template editor, insert a Container icon Container element.
  2. Right-click the container element and select Data > Edit Assignments.
  3. Click Add.
  4. Select a variable and click OK.
  5. In the Set Assignments for Current Element window, click the Data Expression tab.
  6. Select an attribute to assign to the variable and click OK.
  7. Drag a Paragraph icon Paragraph element after the container element.
  8. From the Outline view, select a master page and drag it into the paragraph element.
  9. From the Palette view, drag a Text icon Text element into the paragraph element.
  10. From the Data Source Schema, drag the _value into the text element.
  11. Save the changes.

Example

To display the name of a Rational DOORS® module in the page header:
  1. Add a Rational DOORS data source schema.
  2. In the template editor, insert a Container icon Container element.
  3. Right-click the container element and select Data > Edit Assignments.
  4. Select the _reportName variable and click Edit.
  5. In the Set Assignments for Current Element window, click the Data Expression tab.
  6. Expand Attributes and select the Name attribute.
  7. Click OK and OK to close the windows.
  8. From the Palette view, drag a Paragraph icon Paragraph element and place it after the container element.
  9. From the Outline view, select a master page and drag it into the paragraph element.
  10. From the Palette view, drag a Text icon Text element into the paragraph element.
  11. From the Data Source Schema, drag the _value into the text element.

Feedback