Creating a Repeating Paragraph Using the Ribbon

Top Previous Topic Next Topic  Print this topic

You can use the Ribbon to insert a Repeating Paragraph by following the steps provided below.

 

1. Select the Repeating Paragraph button from the Insert Tab in the Ribbon.

 

2. Next, in the Repeated Paragraph Dialog, you will need to simply navigate to the element you wish the paragraph to repeat for in the Data Tree and select that item then select save. In our example, we want to create a repeating paragraph to display information contained within every "Product" element. You will notice that your selection will be highlighted in the Data Tree. For more complex needs, you can select Create Expression to construct a customized XPath Expression.

 

rpar2

Figure 1: The Product field has been selected in the Repeated Paragraph Dialog.

 

3. Notice in the Design Surface that a Repeating Paragraph is now inserted. You should be aware that you will have a visual indication of which element the paragraph repeats for and the paragraph will be highlighted in blue indicating that it is a Repeating Paragraph.

 

reppar3

Figure 2: The Design Surface provides visual indication of a Repeating Paragraph.

 

4. Next, you will need to replace the placeholder text with the content you wish to be displayed. Here you will simply highlight and delete the placeholder text and add the relevant content you wish to display for each occurrence. In our example, we will add the product "name" attribute as well as the "description" attribute with some static text "Product Description". When inserting Fields into the Repeating Paragraph, the Publisher will automatically take into consideration the repeating context of the paragraph. Additionally, we have added an additional space to separate the content when it is repeated.

 

reppar4

Figure 3: The content is added inside of the Repeating Paragraph.

 

6. When you have finished adding the content that you wish to be presented in each paragraph, you should preview your output to ensure that the content is retrieved from your data source and displayed properly. As you can see in Figure 4 a new paragraph is created for each "Product" element displaying the information relative to every occurrence of the "Product" element.

 

reppar5

Figure 4: The Repeating Paragraph displays information for every product appropriately.