Template:Sortname flag
Jump to navigation
Jump to search
File:Flag placeholder.svg [[{{{first}}} {{{last}}}]] (25x17px)
File:Test Template Info-Icon - Version (2).svg Template documentation[view] [edit] [history] [purge]
Usage
[edit source]This template is used to display a flag next to a person within a sortable table, with the sorting defaulting to surname first.
{{sortname flag|first|last|optional link target|optional sort key|nat=Country code or name|var=optional flag variant|code=optional code value}}
- The default sort key is "last, first".
- The link label is "first last".
- The default link target is "first last"
- Optional parameters
|dab=disambiguator- Wikilinks to "first last (disambiguator)".
(Note: ignored if optional link target is not blank.)
- Wikilinks to "first last (disambiguator)".
|nolink=1- Suppresses wikilinking the name, useful for list entries which are likely to never have articles so shouldn't be redlinked.
(Note: optional link target ignored when "|nolink=1" used.)
- Suppresses wikilinking the name, useful for list entries which are likely to never have articles so shouldn't be redlinked.
Examples
[edit source]| Text typed | Text displayed | Sort key |
|---|---|---|
{{sortname flag|Junior|Firpo|nat=DOM}}
|
File:Flag of the Dominican Republic.svg Junior Firpo (DOM) | Firpo, Junior |
{{sortname flag|Daniel|James|dab=footballer|nat=WAL}}
|
File:Flag of Wales (1959–present).svg Daniel James (WAL) | James, Daniel |
{{sortname flag|Sam|Greenwood|Sam Greenwood (footballer)|nat=ENG}}
|
File:Flag of England.svg Sam Greenwood (ENG) | Greenwood, Sam |
{{sortname flag|John|Smith|nolink=1|nat=NZL|var=1834}}
|
File:Flag of the United Tribes of New Zealand.svg John Smith (NZL) | Smith, John |
See also
[edit source]- Template:Flag athlete for an equivalent template but with default sorting
- Template:Sortname for sorting names without producing a flag
No description.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| First Name | 1 | no description
| Unknown | required |
| Last Name | 2 | no description
| Unknown | required |
| Country code or name | nat | Selects the country whose flag is to be shown.
| String | required |
| Flag variant | var | Selects the variant of the flag to be used; see Template:Flag.
| String | optional |
| Optional Link Target | 3 | no description
| Page name | optional |
| Optional Sort Key | 4 | no description
| Unknown | optional |
| Disambiguator (no brackets) | dab | no description
| Unknown | optional |
| No Link | nolink | Type "1" for no wikilink to appear
| Unknown | optional |
| sort | sort | no description | Unknown | optional |
| last | last | no description | Unknown | optional |
| first | first | no description | Unknown | optional |
| link | link | no description | Unknown | optional |
| Country code for display | code | The code to display after the name, if different to parameter 2, "Country code or name".
| Unknown | optional |