In PowerPoint there is three kinds of bindings: section bindings, shape bindings and slide bindings.
Slide bindings are made using inline tags inside the visible text on the slide.
Section bindings are made using the name field of sections in the presentation.
Shape bindings are made using the alternative text of shapes.
For example, for a presentation created with the following dataset:
{
"title": "Product Quote",
"contact": {
"name": "John Doe"
},
"products": [
{
"name": "Grey Tile",
"price": "40 $",
"image": "https://example.com/grey-tile-40.jpg"
},
{
"name": "White Tile",
"price": "39 $",
"image": "https://example.com/white-tile-39.jpg"
}
]
}
Slide bindings
A slide binding can be used on the slide inside the text, for example:
Inserts title -> “Product Quote” and contact.name -> “John Doe”
Section bindings
A section binding can be used to for example repeat the section, in this case:
Repeats slide 2 for each product in products, and renames the new section “Product List”.
The first repeated slide will then have the following data:
{
"name": "Grey Tile",
"price": "40 $",
"image": "https://example.com/grey-tile-40.jpg"
}
And the second slide will have the following data:
{
"name": "White Tile",
"price": "39 $",
"image": "https://example.com/white-tile-39.jpg"
}
Shape bindings
A shape binding could be image insertion that on a shape fetches and image and inserts it:
Inserts the image file from “image” in the data and using the “fit” application. After inserting the image, the alternative text is set to “Image of the product”.
Binding key evaluation
A binding key is evaluated based on an expected type. For example, if we would like to use a List (Repeat) binding, we would expect a list type. If we would like to use a Field binding, we would expect a string value type.
Path to the binding key
Values are resolved from binding keys based on the dataset and the current scope.
Accessing data from existing scope can be done by pointing directly to the key.
In case of needing to switch the scope, use those operands:
- “[Index].” -> Example <<Field:slidesData[0].HeadingText>>
- This allows for accessing a scope from a specified list object based on the index defined.
- “..” -> Example <<Field:..DefaultHeadingText>
- This allows for navigating up the scope