id required default (empty)Names the table instance for this page render. Every {table:} call that uses the same id reads and writes the same in-memory table. The table lives only for the duration of one page render; it is not stored.
cmd required default (empty)The operation to perform. One of: set (store a value), get (read a value back), addset (add a number to a cell), joinset (append to a cell with a delimiter), sum (total a column over all rows), print (render the whole table as an HTML table).
r optional default (empty)Row key - any string identifies the row. Rows render in the order they are first written. Ignored by sum (which totals every row) and by print.
c optional default (empty)Column key - any string identifies the column. Columns render in first-seen order. For get, c may be a dash-joined list (first-last) and the listed cells are concatenated. Ignored by print.
val optional default _#1 (for get and sum)For set, addset and joinset this is the value to store or add. For get and sum it is an output template: _#1 is replaced by the cell value (get) or the column total (sum); _#attr pulls a named attribute of the cell (get). Defaults to _#1 for get and sum.
param optional default 1 (attribute name, for set)Extra argument that depends on cmd. For set it is the attribute name to store the value under (default 1). For joinset it is the delimiter placed between joined values. Ignored by the other commands.
{table:tE:set:0:tags:red}{table:tE:joinset:0:tags:green:, }{table:tE:get:0:tags}
{table:tD:set:0:total:10}{table:tD:addset:0:total:5}{table:tD:get:0:total}
{table:tG:set:0:amt:100}{table:tG:set:1:amt:50}{table:tG:sum:x:amt:Sum is _#1 USD}
{table:tA:set:0:name:Alice}{table:tA:get:0:name}
{table:tB:set:0:first:Jane}{table:tB:set:0:last:Roe}{table:tB:get:0:first-last}
{table:tC:set:0:price:42}{table:tC:get:0:price:[_#1]}
{table:tF:set:0:amt:100}{table:tF:set:1:amt:50}{table:tF:set:2:amt:25}{table:tF:sum:x:amt}
{table:tH:set:0:m:5:value}{table:tH:set:0:m:kg:unit}{table:tH:get:0:m:_#value _#unit}
{table:tI:set:0:a:1}{table:tI:set:0:b:2}{table:tI:set:1:a:3}{table:tI:set:1:b:4}{table:tI:print}
| 1 | 2 |
| 3 | 4 |
| 1 | 2 |
| 3 | 4 |