Creating a container element

A container element is different from a paragraph. It has no footprint in the output document, which allows you to define conditions, perform calculations or identify data from a group of elements. A paragraph element begins with a new line character whereas a container does not. Otherwise, these elements essentially perform the same function and have the similar properties (can apply a master page, condition, style and so on.)

Procedure

  1. Perform one of the following tasks:
    • From the Palette view select Container and click anywhere in the editor area.
    • In the editor area, right-click and select Insert > Container.
    • In the Outline pane, select Content, right-click and select Insert > Container.
  2. Select the added list and modify its properties in the Properties pane.
  3. Click File > Save As or click the Save icon on the toolbar.

What to do next

Note: A new Loop function is introduced that adds the do while loop capabilities to IBM® Rational® Publishing Engine that enables actions to be executed repeatedly. You can set the do while property of the container to true and the container, and all its children, will be evaluated again.
There are different types of containers:
  • Normal Container: Is a container defined in any template element except tables, rows and lists.
  • List Container: Is a container defined in a list at the same level as list details. Any container defined inside such a container.
  • Table Container: Is container defined in a table at the same level as rows. Any container defined inside such a container.
  • Row Container: Is a container defined in a list at the same level as cells. Any containers defined inside such a container.
When using an iterator, you can use it within the container. This helps to change the formatting element easily and also makes the template more uniform. For tables it has the advantage of avoiding empty rows to appear, (where you put a condition in the row based on the attributes of the parent container) and also avoids rows with uneven number of cells.

When tables are involved: You put the query on containers that host rows or in containers inside cells, depending on where you need to iterate.

When no tables are involved: You tend to put all queries on containers and then inside those containers, you put the rendering elements, such as paragraphs, hyperlinks, texts an so on.

The following are list of tasks that can be performed in the container element and also some restrictions of tasks that cannot be performed:
What is allowed What is not allowed
Dragging normal containers in any other normal container limited by queries. For example, you can drag a container in another container at the root of the template or drag a container in a container inside a paragraph. Dragging list containers, table containers, row containers in any other element other than list containers, table containers, row containers or in lists, tables, rows. For example, you cannot drag a table container outside the table regardless of its contents.
Dragging list containers in any other list containers or lists. For example, you can define a container inside a list and then drag it in another list container in the same list or (another list) or you can define a container inside a list and then drag it in another list. Dragging normal containers in list containers, row containers, table containers or in lists, rows, tables if they contain any element that is not allowed in the target context.
Dragging table containers in any other table containers or table. For example, you can define a container inside a table and then drag it in another table container (in the same table or another table) or you can define a container inside a table and then drag it in another table. A container including other containers cannot be dragged from outside a table, row, list into a table, row, list.
Dragging row containers in any other row containers. For example, you can define a container inside a row and then drag it in another row container in the same row or another row.  
Dragging normal container in list containers, table containers or row containers as long as the normal container includes only elements allowed in the list container, table container, or row container. The valid included elements are other containers and Dynamic Data Sources. For example,
  1. Define a container at the root of the template.
  2. Add a DDS block inside it or another container.
You can drag them in any list container, table container, row container or list, table, row.
 

Feedback