Anonymous
×
Create a new article
Write your page title here:
We currently have 55 articles on SR5 Foundry VTT System Wiki. Type your article name above or click on one of the titles below and start writing!



SR5 Foundry VTT System Wiki

Template:TableTop/Documentation: Difference between revisions

(Created page with "<includeonly>Category:Table Template</includeonly> {{Template|TableTop}} is used in conjunction with other {{Category|Table Template}}s in the creation of properly formatted tables. ==Usage== It accepts one {{Parameter|mandatory|string}} and up to six additional {{Parameter|optional|string}}s. All seven are used as headers in the table. It supports four {{Parameter|optional|named}}s: * {{Code|float}} — controls which side of the content the table appears on, {...")
 
No edit summary
Line 10: Line 10:
** {{Code|edit}} &mdash; If {{Code|caption}} is set, this parameter can be set to the table article's name to invoke {{Template|Edit}} and add a quick-edit link to the caption.
** {{Code|edit}} &mdash; If {{Code|caption}} is set, this parameter can be set to the table article's name to invoke {{Template|Edit}} and add a quick-edit link to the caption.
==Return==
==Return==
The table starts with {{Code|<nowiki><table class="wikitable"></nowiki>}}, then the supplied parameters are used to construct a {{Code|<nowiki><th /></nowiki>}} with each parameter wrapped in a {{Code|<nowiki><td /></nowiki>}}. For example, {{code|<nowiki>{{TableTop|A|B|C|sortable=true|caption={{template|TableTop}} Sample|edit=true}}</nowiki>}} produces the header in:
The table starts with {{Code|<nowiki><table class="wikitable"></nowiki>}}, then the supplied parameters are used to construct a {{Code|<nowiki><th /></nowiki>}} with each parameter wrapped in a {{Code|<nowiki><td /></nowiki>}}. For example, {{code|<nowiki>{{TableTop|Column A|Column B|Column C|caption=Sample|sortable=true}}</nowiki>}} produces the header in:
{{Return|{{Table:Sample}}}}
{{Return|{{Table:Sample}}}}

Revision as of 19:12, 21 November 2023

Template:TableTop is used in conjunction with other Table Templates in the creation of properly formatted tables.

Usage

It accepts one mandatory string parameter and up to six additional optional string parameters. All seven are used as headers in the table.

It supports four optional named parameters:

  • float — controls which side of the content the table appears on, left or right.
  • sortable — if set to true it adds the sortable option to the <table /> class.
  • caption — adds a table caption.
    • edit — If caption is set, this parameter can be set to the table article's name to invoke Template:Edit and add a quick-edit link to the caption.

Return

The table starts with <table class="wikitable">, then the supplied parameters are used to construct a <th /> with each parameter wrapped in a <td />. For example, {{TableTop|Column A|Column B|Column C|caption=Sample|sortable=true}} produces the header in:

Sample
Column AColumn BColumn C
Cell A1Cell B1Cell C1
Cell A2Cell B2Cell C2
Cell A3Cell B3Cell C3