SlideElementRepeat

This is a combination of the Repeat binding and the SlideElement binding, meaning that the presentation to insert will be repeated for each element in a given array. In the presentation the slides are inserted, the section must contain at least one slide, which will be used as a reference for where the slides are inserted. Only the inserted slides will remain in the section, and all previous sides from that section will deleted.

Syntax

<<SlideElementRepeat:Label$ArrayPath$FilePath$DataPath>>

Parameters

Label: Name of the section in the generated presentation.
ArrayPath: JSON path to the array that will be looped through for the insertion.
FilePathJSON path of the string containing the slide to be inserted. The string can be either an URL for downloading the file or a Base64 encoding. The path is relative to the current element in the array.
DataPath: JSON path of the JSON object that will be used as input data for the slides. The path is relative to the current element in the array.

Notes

The FilePath parameter should, as mentioned, be referring to an element in the array from the ArrayPath parameter like the example below:

{
    "Title": "This is title",
    "SubTitle": "This is subtitle",
    "slideDataArr": [ {
        "slideElementBase": "https://somePresentationDownloadUrl.com",
        "slideData": {
            "Title": "First title"
        }
    },
    {
        "slideElementBase": "https://somePresentationDownloadUrl.com",
        "slideData": {
            "Title": "Second title"
        }
    },
    {
        "slideElementBase": "https://somePresentationDownloadUrl.com",
        "slideData": {
            "Title": "Third title"
        }
    }
  ]
}

Where the binding in the section would look like: <<SlideElementRepeat:Section Name$slideDataArr$slideElementBase$slideData>>

However, when the slide element is a Base64 string it can be heavy to have the same Base64 string in each array element. Therefore, it is possible to refer to the root of the data in the binding by adding ../ in front of the FilePath.

An example could look like following:

{
    "Title": "This is title",
    "SubTitle": "This is subtitle",
    "slideElementBase": "UEsDBBQABgAIAAAAIQBVp14otgEAAKsM... (TRUNCATED)",
    "slideDataArr": [ {
        "slideData": {
            "Title": "First title"
        }
    },
    {
        "slideData": {
            "Title": "Second title"
        }
    },
    {
        "slideData": {
            "Title": "Third title"
        }
    }
  ]
}

Where the path to use for FilePath is the slideElementBase (which is in the root and not for every element in the array), which means the binding should look like following example: <<SlideElementRepeat:Section Name$slideDataArr$../slideElementBase$slideData>>

It is possible to create a Base64 string of existing DocuMotor templates to use for the SlideElementRepeat binding. See this article for more information.