Using loops in templates
Gosu templates can include loops that iterate over multiple objects such as all policy revisions associated with a policy. A Gosu template with the root object policy might look something like the following code.
<% for (var thisPolicyRev in policy.revisions) { %>
Policy revision number: <%= thisPolicyRev.PolicyNumber %>
<% } %>
This template might generate something like the following output.
Policy revision number: HO-123456-01
Policy revision number: HO-123456-02
Policy revision number: HO-123456-03
