Lists are extensively used in documents to emphasize important ideas and increase the readability of text by arranging and formatting information.
In this section we’ll show you how to dynamically generate items within different types of lists and specify their options. For this purpose, we’ll use a sample data source, presented at the end of this page, and a number of prime template examples provided below.
In-Paragraph List
An in-paragraph list is the most simple and straightforward form of the list, where items are embedded into the text of a paragraph.
You can generate an in-paragraph list with the following data band:
We provide support for the following products: LG Nexus 5, Nokia Lumia 5801, Huawie Mate S, Moto Style.
Bulleted List
A list, which items are marked out with bullets, is called a Bulleted List. The bullet symbol may take a variety of shapes, such as circular, square, diamond, arrow and other. You can use any bullet symbol in your document template.
The following example shows how to generate a bulleted list with circular bullets:
1. LG Nexus 5
2. Nokia Lumia 5801
3. Huawie Mate S
4. Moto Style
When working with a nested numbered list you can use a Numbering Restart feature to control the indexation options of the nested element sequence. To implement this you need to put a restartNum tag before the corresponding foreach tag in the nested numbered paragraph.
This technique is illustrated in the following example with two interrelated data bands. The outer loop is involved in the processing of Order data elements, while the inner loop is dealing with the Service data elements, related to each Order element.
You can restart list numbering of an inner loop on each outer loop iteration as follows:
You can apply dynamic item colouring using conditional expressions.
The following example shows how you can define different colouring options for even and odd elements of the sequence:
We provide support for the following products:
1. <<foreach [in products]>><<if [IndexOf() % 2 == 1]>><<[ProductName]>>2. <<else>><<[ProductName]>><</if>><</foreach>>
The result would be as follows:
We provide support for the following products:
1. LG Nexus 52. Nokia Lumia 58013. Huawie Mate S4. Moto Style
Sample Data Source
The following XML and JSON data sources represent a list of persons, described by their names and ages: