Jump to content

Template:Sortname flag/doc

From Wikipedia, the free encyclopedia

Usage

[edit]

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.)
|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.)

Examples

[edit]
Text typed Text displayed Sort key
{{sortname flag|Junior|Firpo|nat=DOM}}  Junior Firpo (DOM) Firpo, Junior
{{sortname flag|Daniel|James|dab=footballer|nat=WAL}}  Daniel James (WAL) James, Daniel
{{sortname flag|Sam|Greenwood|Sam Greenwood (footballer)|nat=ENG}}  Sam Greenwood (ENG) Greenwood, Sam
{{sortname flag|John|Smith|nolink=1|nat=NZL|var=1834}}  John Smith (NZL) Smith, John

See also

[edit]


No description.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
First Name1

no description

Example
Daniel
Unknownrequired
Last Name2

no description

Example
James
Unknownrequired
Country code or namenat

Selects the country whose flag is to be shown.

Example
WAL
Stringrequired
Flag variantvar

Selects the variant of the flag to be used; see Template:Flag.

Example
1807
Stringoptional
Optional Link Target3

no description

Example
Daniel James (footballer)
Page nameoptional
Optional Sort Key4

no description

Example
James, Daniel
Unknownoptional
Disambiguator (no brackets)dab

no description

Example
footballer
Unknownoptional
No Linknolink

Type "1" for no wikilink to appear

Example
1
Unknownoptional
sortsort

no description

Unknownoptional
lastlast

no description

Unknownoptional
firstfirst

no description

Unknownoptional
linklink

no description

Unknownoptional
Country code for displaycode

The code to display after the name, if different to parameter 2, "Country code or name".

Default
The value of parameter 2.
Example
YUG
Unknownoptional