Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Template series  





2 Usage  



2.1  Parameters  





2.2  Sorting  







3 Examples  



3.1  Simple case  





3.2  Handling two-digit rankings, blank, or special values  







4 Deprecated templates  





5 See also  














Template:Silver2






Afrikaans
العربية

Авар
Azərbaycanca
تۆرکجه
Basa Bali

 / Bân-lâm-gú
Башҡортса
Беларуская
Беларуская (тарашкевіца)
Български
Bosanski
Català
Dansk
Ελληνικά
Euskara
فارسی
Føroyskt
Français
Galego

Հայերեն
ि
Hrvatski
Bahasa Indonesia
Ирон
עברית

Қазақша
Kurdî

Latviešu
Magyar

مازِرونی
Bahasa Melayu
Монгол


Нохчийн
Norsk bokmål
Norsk nynorsk
ି
Oʻzbekcha / ўзбекча

Português
Română
Русский
Саха тыла

Scots
Simple English
سنڌي
Slovenčina
کوردی
Српски / srpski
Sunda
Suomi
Svenska

Türkçe
Українська
اردو
Tiếng Vit


 

Edit links
 









Template
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 




In other projects  



Wikiversity
 
















Appearance
   

 





Permanently protected template

From Wikipedia, the free encyclopedia
 


2nd place, silver medalist(s)

[edit]

This template is for including medal symbols in sporting event result tables, while preserving the ability for sort.

Template series

The first group of templates show medal images while giving a table sort of 01, 02 or 03, respectively.

The second group of templates are show medal images with display text of either Gold, Silver, Bronze. These also give a table sort of 01, 02 or 03, respectively.

Usage

Simply insert the template where you would like to see the symbol. No parameters are required.

Parameters

The link parameter can be used to pass a link to an article to these templates.

Example:

It defaults to null.

Sorting

These templates use 01, 02 and 03 as the gold, silver, and bronze sort value, respectively. Sorting will operate numerically unless the column also contains any non-numeric text, in which case a text sort may sometimes occur (e.g. "10" is before "3").

To get the desired sort results for other values it may be necessary to use the data-sort-type="..." and data-sort-value="..." attributes. Placing a data-sort-type="number" attribute in the header cell will force a numeric sort. Adding a data-sort-value="..." attribute to a data cell will override the value.

A commonly used but now-deprecated technique is to use the {{hidden sort key}}or{{sort}} templates to specify appropriate sort keys to be inserted as hidden text in front of the displayed values. For example, {{hs|99}}DQ and {{sort|99|DQ}} both display "DQ" but sort using "99 DQ". A text sort still occurs, but the desired results can be achieved using carefully selected hidden values. Sometimes leading zeros or other tricks may be needed.

See Help:Sorting#Configuring the sorting for additional details.

Examples

Simple case

When all ranks are single digit numbers, the templates can be used directly in place of the ranks.

The following markup:

{| class="wikitable sortable" style="text-align:center"
! Rank !! Place
|-
| {{Gold1}} || First
|-
| {{Silver2}} || Second
|-
| {{Bronze3}} || Third
|-
| 4 || Fourth
|-
| 5 || Fifth
|-
| 6 || Sixth
|-
| 7 || Seventh
|-
| 8 || Eighth
|}

...will display as:

Rank Place
1st place, gold medalist(s) First
2nd place, silver medalist(s) Second
3rd place, bronze medalist(s) Third
4 Fourth
5 Fifth
6 Sixth
7 Seventh
8 Eighth

Handling two-digit rankings, blank, or special values

When the rankings contain two-digit rankings, blank, or special values, additional markup may be needed to trigger numeric sorting and/or to explicitly set equivalent sort values. The preferred method is to use the data-sort-type="..." and data-sort-value="..." attributes. Placing a data-sort-type="number" attribute in the header cell will force a numeric sort order. Adding a data-sort-value="..." attribute to a data cell will override the value.

The following markup:

{| class="wikitable sortable" style="text-align:center"
! data-sort-type="number" | Rank !! Place !! Bad Sort !! Older Sort Style
|-
| {{Gold1}} || First || 1 || {{Gold1}}
|-
| {{Silver2}} || Second || 2 || {{Silver2}}
|-
| {{Bronze3}} || Third || 3 || {{Bronze3}}
|-
| 4* || Fourth || 4* || {{Sort|04|4*}}
|-
| 5 || Fifth || 5 || {{Sort|05|5}}
|-
| 10 || Tenth || 10 || 10
|-
| 11 || Eleventh  || 11 || 11
|-
| 20 || Twentieth || 20 || 20
|-
| 50 || Fiftieth || 50 || 50
|-
| data-sort-value="96"|NM || No mark || NM || {{Sort|96|NM}}
|-
| data-sort-value="97"|DQ || Disqualified || DQ || {{Sort|97|DQ}}
|-
| data-sort-value="98"|– || Dash || – || {{hidden sort key|98}}–
|-
| data-sort-value="99"| || Empty ||  || {{hidden sort key|99}}
|}

...will display as:

Rank Place Bad Sort Older Sort Style
1st place, gold medalist(s) First 1 1st place, gold medalist(s)
2nd place, silver medalist(s) Second 2 2nd place, silver medalist(s)
3rd place, bronze medalist(s) Third 3 3rd place, bronze medalist(s)
4* Fourth 4* 4*
5 Fifth 5 5
10 Tenth 10 10
11 Eleventh 11 11
20 Twentieth 20 20
50 Fiftieth 50 50
NM No mark NM NM
DQ Disqualified DQ DQ
Dash
Empty

As demonstrated in the rightmost column, the {{sort}} and {{hidden sort key}} templates can also be used to resolve sorting problems, but this methodology is deprecated.

Deprecated templates

The below templates have had their functionality merged into the main templates, as bad sorting is never a useful feature.

See also


Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Silver2&oldid=1103196719"

Category: 
Olympic medal templates
Hidden category: 
Wikipedia template-protected templates
 



This page was last edited on 8 August 2022, at 19:03 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki