Vector: repeat

This vector creates a loop. It allows you to repeat over the entities in a table. Using the options available to this vector, you can also filter which entities are include as well as sort them on any field (multi-field sorting is coming soon). Everything between the {{repeat}} and {{endrepeat}} vectors will be looped over. When referencing {{entity}} vectors within a loop that refer to the table being repeated over, you no longer have to specify the entity id with each one. For instance, {{entity:home.12.address}} would become {{entity:home.address}}. The Vectoran engine will automatically determine the correct entity id based on which entity it is at in the loop.

You can filter on as many fields as you like using the filterXXXX option. Each filter option must start with the word "filter" and be succeeded by a unique string. As a rule of thumb, I just use ascending numbers. This way the Vectoran engine is able to identify each filter as unique. If you just use "filter" each time, then it will only use the last one as it will override all over the others since it is the exact same name. The value of the filter is the vector name of the field you want to filter upon followed by a colon (:) and then the value that should be in that field. You can specify wildcards using the asterisk (*). The filtering is case-insensitive. An example of how I generally do it is as follows:

{{ repeat:home | filter1=city:dallas | filter2=owner:*bob* | filter3=visible:yes }}

More details coming soon!

Note: you must always include the {{endrepeat}} vector with every {{repeat}} vector you use.


  The address of this house is {{entity:home.address}}<br />

  The address of this house is {{entity:home.address}}<br />