Difference between revisions of "Template:GroupTableColHeader/doc"

From QWiki
m (Updated doc)
m (Adding inter-doc links)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Adds a column header row to a group table. This template is used inbetween the templates {{tl|GroupTableStart}} and {{tl|GroupTableSlot}}, which have to end with with {{tl|GroupTableEnd}}).
+
<div style="float:right;padding:0 10px 10px 10px;margin: 0 0 10px 40px;border: 1px solid #aaa;">
 +
<small>'''Related templates:'''</small>
 +
* {{Tl|LeagueTableSlot2on2}}
 +
* {{Tl|LeagueTableSlotNQR}}
 +
* {{Tl|LeagueTableSlotNQR2}}
 +
* {{Tl|GroupTableSlot}}
 +
</div>Adds a column header row to a group table. This template is used inbetween the templates {{tl|GroupTableStart}} and {{tl|GroupTableSlot}}, which have to end with with {{tl|GroupTableEnd}}).
 +
 
 +
=== Example #1 ===
 +
<nowiki>{{GroupTableStart|GroupTableStart|width=100%}}</nowiki>
 +
<nowiki>{{GroupTableColHeader|Nation|games=1|maps=1|diff=1}}</nowiki>
 +
<nowiki>{{GroupTableEnd}}</nowiki>
 +
 
 +
Gives us:
 +
 
 +
{{GroupTableStart|GroupTableStart|width=100%}}
 +
{{GroupTableColHeader|Nation|games=1|maps=1|diff=1}}
 +
{{GroupTableEnd}}
 +
 
 +
=== Example #1 ===
 +
<nowiki>{{GroupTableStart|GroupTableStart|width=100%}}</nowiki>
 +
<nowiki>{{GroupTableColHeader|Nation|games=1|maps=1|diff=}}</nowiki>
 +
<nowiki>{{GroupTableEnd}}</nowiki>
 +
 
 +
Gives us:
 +
 
 +
{{GroupTableStart|GroupTableStart|width=100%}}
 +
{{GroupTableColHeader|Nation|games=1|maps=1|diff=}}
 +
{{GroupTableEnd}}
  
 
== Parameters ==
 
== Parameters ==
Line 13: Line 41:
 
;''|diff=''
 
;''|diff=''
 
:(Optional) If not empty, it will display "Diff" header
 
:(Optional) If not empty, it will display "Diff" header
;''|points=''
 
:(Optional) If not empty, it will display "Points" header. The code is messy, you might wanna try different combinations together with <mark>|col=#</mark> depending on total # of cols you want. Also, there's no corresponding "points" in {{tl|MatchListNoheader}}, so use |diff for that.
 
 
== Examples ==
 
=== #1 ===
 
<nowiki>{{GroupTableStart|GroupTableStart}}</nowiki>
 
<nowiki>{{GroupTableColHeader|Nation|games=1|maps=1|diff=1}}</nowiki>
 
<nowiki>{{Template:GroupTableEnd}}</nowiki>
 
 
This will result in the following table
 
 
{{GroupTableStart|GroupTableStart}}
 
{{GroupTableColHeader|Nation|games=1|maps=1|diff=1}}
 
{{Template:GroupTableEnd}}
 
 
=== #2 ===
 
<nowiki>{{GroupTableStart|GroupTableStart}}</nowiki>
 
<nowiki>{{GroupTableColHeader|Nation|games=1|maps=1|diff=}}</nowiki>
 
<nowiki>{{Template:GroupTableEnd}}</nowiki>
 
 
This will result in the following table
 
 
{{GroupTableStart|GroupTableStart}}
 
{{GroupTableColHeader|Nation|games=1|maps=1|diff=}}
 
{{Template:GroupTableEnd}}
 

Latest revision as of 09:50, 29 March 2021

Adds a column header row to a group table. This template is used inbetween the templates {{GroupTableStart}} and {{GroupTableSlot}}, which have to end with with {{GroupTableEnd}}).

Example #1

{{GroupTableStart|GroupTableStart|width=100%}}
{{GroupTableColHeader|Nation|games=1|maps=1|diff=1}}
{{GroupTableEnd}}

Gives us:

GroupTableStart
# Nation Games Maps Diff

Example #1

{{GroupTableStart|GroupTableStart|width=100%}}
{{GroupTableColHeader|Nation|games=1|maps=1|diff=}}
{{GroupTableEnd}}

Gives us:

GroupTableStart
# Nation Games Maps

Parameters

The following parameters can be used for this template

first unnamed argument
The first unnamed argument of the parameter list is used as the name of player column. Examples could be Player, Team or Nation.
|games=
(Optional) If not empty, it will display "Games" header
|maps=
(Optional) If not empty, it will display "Maps" header
|diff=
(Optional) If not empty, it will display "Diff" header