Create a nice looking Header section

To create a nice looking Header we will use a Table element with one Row having 3 Cells. In the first Cell we want to display some text, in the second Cell we want to display a text that will be retrieve dynamically from a data source, and in the third Cell we will display an Image representing a logo.

In this regard, we create a Table in the Header. We select value 1 for the number of rows and value 3 for the number of columns. We create two Paragraph elements in the first Cell. Two Text elements will be created, one in each Paragraph. We set the content of the first Text to the ”Rational Publishing Engine” text and “Tutorials and Advanced Topics” text for the second Text.

To set some dynamic text in the second Cell, we will use a Variable. We create a Variable named ProjectName_. In the second Cell we insert the newly created Variable. In the Template Content we will assign to this Variable a value using the Assignment features of RPE.

In the third Cell we insert a picture file representing the company logo.

At this point the Master Page will be as in the following picture.

Header Section

To assign a value for the Variable, we select the Template Content tab. And in the first Element having a proper query we will select from the contextual menu Data -> Edit Assignments … Then we select Add, select the ProjectName_ Variable, and set the desired Value selecting a proper value from the three existing possibilities: Simple Value, Data Expression and Script Expression.

Now we can proceed to the next step: formatting the Header.

Format the Table element using the following properties:

Set Formatting->specific->table auto fit value to autofit to window
Set Formatting->specific->resize to fit contents value to false.

Format the first cell:

Set Formatting->specific->cell alignment value to center left.
Set Formatting->specific->cell width value to 175.

Format the second cell:

Set Formatting->specific->cell alignment value to center.
Set Formatting->specific->cell width value to 150.
Set bold for the Text element.

Format the third cell:

Set Formatting->specific->cell alignment value to center right.

We assign the Master Page to a Paragraph in the Template Content. Now run the template and observe the resulted Header.

Leave a Reply