A monthly recurring invoice.
This example demonstrates how inner tables can expand to accommodate more line items, without affecting formatting.
The example also includes a dynamic hyperlink.
Expanding inner table
The inner table labelled "Account Summary" has a row inserted for every item in the Items array.
This is because it contains the <<rr_ repeating rows directive.
- Use repeating rows to loop through the Items data: <<rr_items>>...<<rr_>>.
- Within the loop, display the item and the amount on a new row: <<item>> and $<<amt>>.
The "Account Summary" table expands downwards, if there are more values in the data's Items array, while the other information remains in place.
For further information on repeating rows, see Tables - Part One.
Adding a hyperlink
The "How to Pay" section at the bottom of the page contains syntax for inserting a hyperlink: <<link_toolboxURL>>.
In the template, a field that starts with <<link_ is a hyperlink field. This syntax instructs Docmosis to insert a hyperlink when rendering the document.
In the data file "http://www.metalegalfinance.com" is assigned to toolboxURL.
When the output file is rendered, "http://www.metalegalfinance.com" appears in the position of each of the <<link_toolboxURL>> hyperlink fields, as a clickable hyperlink.
For further information on adding hyperlinks, see Hyperlinks.