MashZone NextGen 10.2 | Appendix | Legacy Presto components | Mashables and Mashups | Views for Mashups and Mashables | Built-in MashZone NextGen Views | Template View | Iterate Through Repeating Results
 
Iterate Through Repeating Results
In many cases, the results contain a repeating structure with data that the view should iterate through, generating HTML and data for each instance. Use the {{each structure.path}} template syntax to performs loops in a template:
1. Enter the start- and end-loop statements where you want to begin looping in the view:
{{each }}
{{/each}}
Note: See jQuery Template Syntax for Loops for more details on looping syntax.
2. Place the cursor after the space in the start-loop statement.
3. Click in the Data pane on the repeating node that should be used as the iterator for the loop:
This adds the full path to the repeating node for the loop.
4. Within the start- and end-loop statements, add the HTML that should be generated for each loop iteration. Map individual fields from the repeating items as needed (see Map Result Fields to the Template).
Mapping uses relative paths to fields within each repeating item, as shown above. See also Repeating Items for a more detailed example.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release