Numbered and Bulleted Lists

The Encodian population engine supports all types of lists including multi-level lists. The source JSON data must be in the form of an array, i.e. one or more items in the list.

This article provides detailed examples for the following topics/scenarios:

General Syntax

Populate a Bulleted List

Populate a Numbered List

Populate a Multi-Level List

General Syntax

Consider the following example JSON data:

{
"bullets": [
{
"listFirstName": "Efren",
"listLastName": "Gaskill"
},
{
"listFirstName": "Sanly",
"listLastName": "Keyme"
},
{
"listFirstName": "Mark",
"listLastName": "Nigma"
}
]
}

Firstly the following syntax should be used to instruct the engine to populate each item within the 'bullets' array object:

<<foreach [bullet in bullets]>>
<</foreach>>

Within the for each token you can then specify which properties from each item within the array to write out, for example:

<<foreach [bullet in bullets]>><<[bullet.listFirstName]>>
<</foreach>>

Or the following variation:

<<foreach [in bullets]>><<[listFirstName]>>
<</foreach>>

Populate a Bulleted List

Example File: Encodian - Template Syntax - List - Basic.pptx

Example JSON Data:

{
"bullets": [
{
"listFirstName": "Efren",
"listLastName": "Gaskill"
},
{
"listFirstName": "Sanly",
"listLastName": "Keyme"
},
{
"listFirstName": "Mark",
"listLastName": "Nigma"
}
]
}

The slide should be set up with the first bullet and then the token/syntax configuration added, for example:

<<foreach [bullet in bullets]>><<[bullet.listFirstName]>> <<[bullet.listLastName]>>
<</foreach>>

This generates the following output:

Populate a Numbered List

Example File: Encodian - Template Syntax - List - Numbered.pptx

Example JSON Data:

{
"bullets": [
{
"listFirstName": "Efren",
"listLastName": "Gaskill"
},
{
"listFirstName": "Sanly",
"listLastName": "Keyme"
},
{
"listFirstName": "Mark",
"listLastName": "Nigma"
}
]
}

The slide should be set up with the first item and then the token/syntax configuration added, for example:

<<foreach [bullet in bullets]>><<[bullet.listFirstName]>> <<[bullet.listLastName]>>
<</foreach>>

This generates the following output:

Populate a Multi-Level List

Example File: Encodian - Template Syntax - List - Multi.pptx

Example JSON Data:

{
"bullets": [
{
"listFirstName": "Efren",
"listLastName": "Gaskill",
"colleagues": [
{
"name": "Bill Gates"
},
{
"name": "Paul Allen"
},
{
"name": "Steve Ballmer"
}
]
},
{
"listFirstName": "Sanly",
"listLastName": "Keyme"
},
{
"listFirstName": "Mark",
"listLastName": "Nigma",
"colleagues": [
{
"name": "Larry Page"
},
{
"name": "Sergey Brin"
}
]
}
]
}

The slide should be set up with the first and secondary bullets and then the token/syntax configuration added, for example:

<<foreach [bullet in bullets]>><<[bullet.listFirstName]>> <<[bullet.listLastName]>>
<<foreach [colleague in bullet.colleagues]>><<[colleague.name]>>
<</foreach>><</foreach>>

This generates the following output:

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk