Skip to main content
Skip table of contents

repeatSlide

A child command of composePPTXContent that iterates over a Collection and produces as many copies of a specific slide of the parent command's presentation as there are items in the Collection. The specified slide and each of the produced slide copies undergo content command evaluation with one of the Collection's items available in the variable context. The produced slide copies are placed after the slide they're copies of.

Parent commands

Attributes

value

Required

Value type

EL-evaluated

Yes

Collection, Map, Data Item

Yes

This attribute defines the container whose contents the command will iterate through. While this container is primarily expected to be a Collection, two other types of values are also accepted.

The three types are handled in the following ways:

  • If the value is a Collection, repeat iterates through the items in it in their proper order.  

  • If the value is a Map, repeat iterates through its entries. The item of every round is therefore a Map entry that allows both the key and the value to access. Note that the order in which the entries appear in is, in most cases, not consistent and basically random.

  • If the value is a Data Item, repeat performs just one loop round, with the Data Item being the item of the round.  

var

Required

Value type

EL-evaluated

Yes

String

No

The value of this attribute defines the name of the local context variable that holds the current item of the loop.

varStatus

Required

Value type

EL-evaluated

No

String

No

Defines the name of the variable that holds a Loop Status value. Loop Status has the properties count, first, last and index. A new value is generated for every iteration of the loop.

Property count is the number of the iteration starting from 1.
Property index is the same as count with the difference that it starts from 0.
Property first is a Boolean true during the first round of the loop. Note that if roundTest causes the first item of the iteration to be skipped, this will never be true.
Property last is a Boolean true during the last round of the loop. Note that if roundTest causes the last item of the iteration to be skipped, this will never be true.

roundTest

Required

Value type

EL-evaluated

No

Boolean

Yes

This attribute can be used to define a condition for skipping certain iteration rounds. This attribute's expression is evaluated at the start of every round and if it doesn't resolve into true, the current item and loop round is skipped, resulting in no copy of the slide being produced.

If undefined, no iteration rounds are skipped.

slide

Required

Value type

EL-evaluated

Yes

Number, String

Yes

Defines the number of the slide to produce copies of, with 1 being the number of the first slide. The resolved value is expected to be a Number, or a number-like String.

Note that this slide number is interpreted in the context of the presentation's original structure before any commands have altered it. If, for example, the slide that was originally number 2 has moved to become number 7 due to other commands placing more slides into the presentation, the value of '2' will refer to that slide despite its current number.  

If the resolved numerical value is less than 1, or higher than the amount of slides originally in the presentation, an error is produced.

Examples

The repeatSlide command can be used to build a sequence of slides based on the data of a Collection. It could, for example, be used to construct slides presenting results of a Salesforce query retrieving data of products.

CODE
<composePPTXContent var="productShow" value="${productTemplate}"><repeatSlide value="${productData}" var="product" slide="2">

In this case, slide number 2 of the template should contain content commands and inline EL expressions making use of the "product" variable.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.