H1: Creating Heading, Footing and Group Rows
H2: Overview
The {{FILT:table}} filter now supports the following attributes:
* {{headings}} - the number of heading rows at the top of the table
* {{footings}} - the number of footing rows at the end of the table
* {{groups}} - look for group rows in the table.
H2: Heading Rows
If the {{headings}} attribute is not defined, then
the column headings are generated using the column names given on
the {{parsing}} line. For example, the column headings in the table
below will be {{Name}} and {{Age}}:
!block example
!block table
Name Age
Bill 42
!endblock
!endblock
Alternatively, if the {{headings}} attribute is defined,
then that number of {{data}} rows are used as the column headings,
i.e. the parsing line is not used to build the column headings.
For example, the column headings in the table below will be
{{"Title"}} and {{Age}} (remembering that a filter attribute is
implicitly given the value 1 is no value is supplied).
!block example
!block table; headings
A B
"Title" Age
Bill 42
Sally 23
!endblock
!endblock
Likewise, the column headings below will be {{Preferred Title}} and
{{Likely Age}} with each heading taking 2 rows.
!block example
!block table; headings=2
A B
Preferred Likely
Title Age
Bill 42
Sally 23
!endblock
!endblock
H2: Footing Rows
These work exactly the same as table headings, except that no footings
are generated by default.
H2: Group Rows
If the {{groups}} parameter is specified, SDF assumes that rows
that end in : are group rows. For example:
!block example
!block table; groups
Fruit Comments
Tropical:
mango a fruit-bat favorite
banana great for smoothies
Other:
Tomato often matched with basil
!endblock
!endblock
The result is:
!block table; groups
Fruit Comments
Tropical:
mango a fruit-bat favorite
banana great for smoothies
Other:
Tomato often matched with basil
!endblock