Template:Awards table sorting/doc
This is a documentation subpage for Template:Awards table sorting. It may contain usage information, categories and other content that is not part of the original template page. |
This template can be useful when making a sortable table involving awards received or competition placement, through the automatic generation of a hidden sortkey.
This is helpful because the default alphabetical sorting does not make sense:
Markup | Renders as | |||||
---|---|---|---|---|---|---|
{| class="wikitable sortable" |+ Incorrect ! Sort me! |- | Semifinalist |- | Quarterfinalist |- | Champion |- | Runner-up |} |
| |||||
{| class="wikitable sortable" |+ Fixed! ! Sort me! |- | {{Awards table sorting|Semifinalist}} |- | {{Awards table sorting|Quarterfinalist}} |- | {{Awards table sorting|Champion}} |- | {{Awards table sorting|Runner-up}} |} |
| |||||
NOTE: This template adds the pipe character |
between the custom data-sort-value
and the cell contents.
Usage
[edit]{{Awards table sorting|Quarterfinalist}}
→ Quarterfinalist
{{Awards table sorting|b=y|Gold}}
→ Gold
{{Awards table sorting|i=y|Bronze| award|nowrap=y}}
→ Bronze award
style="background:gold" {{Awards table sorting|b=y|Champions| (2)|addkey=2}} <small>(2001, 2004)</small>
→ Champions (2) (2001, 2004)
The template can be used together with other cell styling markup, and does not need to encompass entire contents of table cell
Parameter descriptions
[edit]- Award/placement
- First positional argument, or
|1=
- (Required) The award received or placement in a competition. Accepted values:
Gold, Champion, Champions, C, Winner, Winners, W, First, 1st, 1
Silver, Runner-up, Runners-up, RU, Second, 2nd, 2
Bronze, Third, 3rd, 3
Semi Finals, Semi-finals, Semifinals, Semi-finalist, Semi-finalists, Semifinalist, Semifinalists, SF, Round of 4, Ro4, Fourth, 4th, 4
Fifth, 5th, 5
Round of 6, Ro6, Sixth, 6th, 6
Quarter Finals, Quarter-finals, Quarterfinals, Quarter-finalist, Quarter-finalists, Quarterfinalist, Quarterfinalists, QF, Round of 8, Ro8
Inter-zone finals, IZF
;Inter-zone semi-finals, IZSF
;Zonal finals, ZF
;Zonal semi-finals, ZSF
(AFC Cup)Round of 16, Ro16
Round of 24, Ro24
(e.g. UEFA Europa League knockout round play-offs)Round of 32, Ro32
Round of 64, Ro64
Group Winner, Group Winners, Group winner, Group winners
;Group Runner-up, Group Runners-up, Group runner-up, Group runners-up
(UEFA Intertoto Cup, 1967–1994)Group Stage 2, Group stage 2, GS2
Group Stage 1, Group stage 1, GS1
Group Stage, Group stage, GS, Pool Stage, Pool stage, Pool Play, Pool play
Play-off Round, Play-off round, PO
Fifth Round, Fifth round, Round 5, R5
Fourth Round, Fourth round, Round 4, R4
Third Round, Third round, Round 3, R3
Second Round, Second round, Round 2, R2
First Round, First round, Round 1, R1
Qualifying Round 5, QR5
Qualifying Round 4, QR4
Qualifying Round 3, QR3
Qualifying Round 2, QR2
Qualifying Round 1, QR1
Qualifying Round, QR, Qualifying Stage, QS, Qualifying, Q, Qualifier, Qualifiers, Qualified
Preliminary Round 3, PR3
Preliminary Round 2, PR2
Preliminary Round 1, PR1
Preliminary Round, PR, Preliminary Stage, PS
Withdraw, Withdrew, Withdrawn
Cancelled
- Additional sort key
- (Optional) Adds another sort key to impose further ordering between rows with the same award or position. For example, if some teams have won a championship multiple times, this can be indicated e.g.
|addkey=3
to sort according to number of times they have won. Accepts numbers from 0 to 9999.
- Bold/Italic text
- (Optional) renders the text in bold
|b=y
or italic|i=y
. Both may be used; accepts any of the following:Y, y, Yes, yes, True, true, 1
.
- Additional text
- Second positional argument, or
|2=
- (Optional) additional text to be formatted as bold and/or italic, if those options are used. It is not necessary to use this parameter if neither bold not italic text is utilized —— just put the text after the template.
- Wrapping
- (Optional) Word wrapping within the table cell can be suppressed with the parameter
|nowrap=y
Accepts any of the following:Y, y, Yes, yes, True, true, 1
.
Examples
[edit]Year | Award | Category | Beer |
---|---|---|---|
1996 | Gold | American Style Malt Liquor | Olde English 800 |
1996 | Silver | American Style Malt Liquor | Schlitz Malt Liquor |
1996 | Bronze | American Style Malt Liquor | Country Club Malt Liquor |
1996 | Bronze | American Style Ice Lager | Schlitz Ice |
1998 | Gold | American Style Malt Liquor | Schlitz Malt Liquor |
2006 | Gold | American Style Premium Lager | Pabst Blue Ribbon |
2006 | Gold | American Cream Ale or Lager | Old Style |
2008 | Gold | American-Style Cream Ale or Lager | Special Export |
2008 | Gold | American-Style Light Lager | Old Milwaukee Light |
2008 | Silver | American-Style Cream Ale or Lager | Lone Star |
2008 | Silver | American-Style Light Lager | Lone Star Light |
2010 | Gold | American-Style Lager | Olympia |
2010 | Silver | American-Style Cream Ale or Lager | Old Style |
2010 | Silver | American-Style Lager | National Bohemian |
2010 | Bronze | American-Style Cream Ale or Lager | Lone Star |
2010 | Bronze | American-Style Specialty Lager | Colt 45 |
Club | Arab Club Champions Cup | Arab Cup Winners' Cup | Arab Super Cup |
---|---|---|---|
ES Tunis | Winner (3) 1993, 2008–09, 2017 |
— | Winner 1996 |
CS Sfaxien | Winner (2) 2000, 2003–04 |
— | Fourth place 2001 |
Club Africain | Winner 1997 |
Winner 1995 |
Runners-up 1998 |
Stade Tunisien | Fourth 2002 |
Winner (2) 1989, 2001 |
— |
ES Sahel | Winner 2018–19 |
Runners-up 1995 |
— |
CA Bizertin | Semi-finalist 1994 |
— | — |
AS Marsa | — | Semi-finalist (2) 1992, 1994 |
— |
Olympique Béja | Group stage 1999 |
— | — |
US Monastir | Quarter-finalist 2008–09 |
— | — |