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: Difference between revisions

No edit summary
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Documentation}}
{{Documentation}}
<includeonly><onlyinclude>{{#ifeq:{{NAMESPACE}}|Table|[[Category:Table]]}}<table class="wikitable {{#ifeq:{{{sortable|}}}|true|sortable}} skinned" style="{{#switch:{{{float|}}}
<includeonly><onlyinclude>{{#ifeq:{{NAMESPACE}}|Table|[[Category:Table]]}}<div class="blackbox" style="{{#switch:{{{float|}}}
| left = float: left; margin: -5px 15px -5px auto;
| left = float: left; margin: 5px 15px 5px auto;
| right = float: right !important; margin: -5px auto -5px 15px;
| right = float: right; margin: 5px auto 5px 15px;
}}">{{#if:{{{caption|}}}|<caption style="white-space: nowrap;" {{#ifeq:{{NAMESPACE}}|Template||id="{{{caption}}}"}}>{{{caption}}} <sup style="font-weight: normal !important>{{#if:{{{edit|}}}|{{Edit|Table:{{{edit}}}}}}}</sup></caption>}}<tr><th>{{{1}}}</th>{{#if:{{{2|}}}|<th>{{{2}}}</th>}}{{#if:{{{3|}}}|<th>{{{3}}}</th>}}{{#if:{{{4|}}}|<th>{{{4}}}</th>}}{{#if:{{{5|}}}|<th>{{{5}}}</th>}}{{#if:{{{6|}}}|<th>{{{6}}}</th>}}{{#if:{{{7|}}}|<th>{{{7}}}</th>}}</tr>
}}">
<div class="blackbox-1a"></div>
<div class="blackbox-1b yellowpages" id="{{{caption}}}">{{{caption|{{Required|caption|Template:TableTop}}}}}</div>
<div class="blackbox-1c"></div>
<div class="blackbox-1d"></div>
<div class="blackbox-1e"></div>
<div class="blackbox-2a"></div>
<div class="blackbox-2b"><table class="skinned {{#ifeq:{{{sortable|}}}|true|sortable}}"><tr><th>{{{1}}}</th>{{#if:{{{2|}}}|<th>{{{2}}}</th>}}{{#if:{{{3|}}}|<th>{{{3}}}</th>}}{{#if:{{{4|}}}|<th>{{{4}}}</th>}}{{#if:{{{5|}}}|<th>{{{5}}}</th>}}{{#if:{{{6|}}}|<th>{{{6}}}</th>}}{{#if:{{{7|}}}|<th>{{{7}}}</th>}}</tr>
</onlyinclude></includeonly>
</onlyinclude></includeonly>

Latest revision as of 20:42, 24 November 2023

Template:TableTop

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

Usage

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

It also requires mandatory named string parameter:

  • caption — adds a table caption.

It supports two 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.

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

The documentation above was transcluded from Template:TableTop/Documentation.