Section bindings

Bindings placed in the name of a section

Section bindings are placed in the name of a section. They work on entire slides and sections, and have a parameter that replaces the binding in the generated template, to leave no trace of Documotor in generated documents.

BindingDescription
RepeatRepeat all slides in the section once for each element of a provided array.
SlideElementInsert slides from another template into the presentation.
SlideElementRepeatInsert slides from another template and repeat them once for each element of a provided array.
VisibleToggle the visibility of the section of slides.

Repeat

<<Repeat:Label$ArrayPath>>

Duplicate all slides in the section for each element in the array found at ArrayPath, setting the scope to each of the elements in turn. If a section has more than one slide, they are duplicated sequentially.

Parameters

string Label
Name of the section in the generated presentation.

string ArrayPath
JSON path for the array to iterate through.

📘

Repeat bindings can be nested inside each other.

SlideElement

<<SlideElement:Label$FilePath$DataPath>>

Insert the slides from another template at FilePath into the presentation. The section must contain at least 1 slide which is used as a reference for where the slides are inserted. In the generated presentation, only the slides from the slide element will remain in the section.

Parameters

string Label

Name of the section in the generated presentation.

string FilePath

JSON path to the string that contains the template of the slide element. Path is relative to the current element in the array. The string can be either an URL for downloading the file, or a Base64 encoding of a file.

string DataPath

JSON path to a JSON object that will be used as input data for the slide element. Path is relative to the current element in the array. Note that @ is not supported, being a JMESPath expression.

SlideElementRepeat

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

A combination of Repeat and SlideElement bindings. For each element in ArrayPath, insert the slides from another template into the presentation. The section must contain at least 1 slide which is used as a reference for where the slides are inserted. In the generated presentation, only the slides from the slide element will remain in the section.

Parameters

string Label

Name of the section in the generated presentation. DynamicLabel determines whether to treat it as a path or as a string.

string ArrayPath

JSON path for the array to iterate through.

string FilePath

JSON path to the string that contains the template of the slide element. Path is relative to the current element in the array. The string can be either an URL for downloading the file, or a Base64 encoding of a file.

string DataPath

JSON path of the JSON object that will be used as input data for the slide element. Path is relative to the current element in the array.

string DynamicLabel

If True, the Label is treated as a path, otherwise as a string. Default False.

string RemoveSection

If True, the inserted slides will not be grouped into a section. Otherwise, the section name from Label will be used.

Visible

<<Visible:BindingKey$Label>>

Conditionally hide sections of slides. If BindingKey is falsy, hide the section, otherwise, make no change. The section name in the finalized presentation will be Label.

Parameters

string BindingKey

JSON path to the value to bind to in the current scope. Section is visible if truthy and hidden if falsy.

string Label

A string that will be the name of the section in the created presentation, if the section is visible. If not, the section is deleted.

📘

Visible bindings can be nested inside each other.

Nested sections

The standard Repeat and Visible bindings for sections don't allow nesting bindings inside each other, since they end as soon as another section starts. Nested sections allow this, with a slightly different syntax. Here are the steps to creating nested sections:

  • Create a section named <<Binding:Data> preceding the first slide that you want to repeat.
  • Create a section named <Binding>> following the last slide that you want to repeat.

Here, replace Binding with either Repeat or Visible. This will apply to all the slides in between the two empty sections for each element of the Data array, while allowing insertion of another nested section inside or outside it in the same way. The nested sections don't allow setting a name for the section.