table-data

{table-data}

Plugin: Scaffolding Plugin

Allows dynamic addition and deletion of rows in a table.

Description

Any standard data macros other than {table-data} itself can be used inside its cells.

Usage

{table-data:Name}
|| Heading 1 || Heading 2 ||
| {xxx-data:Data 1}{xxx-data} | {xxx-data:Data 2}{xxx-data} |
{table-data}

Parameters

Name Required Default Description
[default]/name
The name of the table. Must be unique to the scaffold.
initialRows
The number of rows to have in the section initially. Saves us from having to hit '+' repeatedly.
order
ascending
If set to 'descending', the content will be sorted in in reverse order, and new rows will be added to the top of the repeating section.

Notes

Due to the simplistic parser currently being used, you need to be careful with how you format the table. The main requirement is that any '|' characters which mark a table boundary must have whitespace on either side. Conversely, any other '|' characters must not have any whitespace around them. For example, in the markup below there are two errors:

  1. The Number column does not have any whitespace around the '|' markers
  2. The Date column does have whitespace inside the macro

{table-data:My Table}
|| Text||\Number ||Date||
| {text-data:Text}|{number-data:Number}0{number-data}|{date-data:Date| format=dd-MMM-yyyy} |
{table-data}

Correct formatting would look like this:

{table-data:My Table}
|| Text || Number || Date ||
| {text-data:Text} | {number-data:Number}0{number-data} | {date-data:Date|format=dd-MMM-yyyy} |
{table-data}

See Also

Labels

macro macro Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.