Template:Sortname cell/doc
| This is a documentation subpage for Template:Sortname cell. It may contain usage information, categories and other content that is not part of the original template page. |
- Usage
{{sortname cell|first|last|optional link target|optional sort key}}
Creates a wikilinked name that can be used in a sortable table (created with class="wikitable sortable").
- The default sort key is "last, first".
- The link label is "first last".
- The default link target is "first last"
The optional link target is useful when "first last" is a disambiguation page instead of the desired article, or when linking to a section of a page.
The optional sort key is useful in the case of special characters such as é.
- 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 never likely to 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 never likely to have articles so shouldn't be redlinked.
Examples
| # | What you type | What's generated |
|---|---|---|
| 1 | {{sortname cell|first|last}}
|
data-sort-value="last, first" | [[first last|first last]] |
| 2 | {{sortname cell|first|last|nolink=1}}
|
data-sort-value="last, first" | first last |
| 3 | {{sortname cell|first|last|dab=disambiguator}}
|
data-sort-value="last, first" | [[first last (disambiguator)|first last]] |
| 4 | {{sortname cell|first|last|target}}
|
data-sort-value="last, first" | [[target|first last]] |
| 5 | {{sortname cell|first|last||sort}}
|
data-sort-value="sort" | [[first last|first last]] |
| 6 | {{sortname cell|first|last||sort|nolink=1}}
|
data-sort-value="sort" | first last |
| 7 | {{sortname cell|first|last|target|sort}}
|
data-sort-value="sort" | [[target|first last]] |
| # | What you type | What's displayed | What's sorted | What's linked |
|---|---|---|---|---|
| 1 | {{sortname cell|Tom|Jones}}
|
Tom Jones | Jones, Tom | Tom Jones |
| 2 | {{sortname cell|Tom|Jones|nolink=1}}
|
Tom Jones | Jones, Tom | (no link) |
| 3 | {{sortname cell|Tom|Jones|dab=singer}}
|
Tom Jones | Jones, Tom | Tom Jones (singer) |
| 4 | {{sortname cell|Tom|Jones|Tom Jones (singer)}}
|
Tom Jones | Jones, Tom | Tom Jones (singer) |
| 1 | {{sortname cell|Fábio|da Silva}}
|
Fábio da Silva | da Silva, Fábio | Fábio da Silva |
| 2 | {{sortname cell|Fábio|da Silva|nolink=1}}
|
Fábio da Silva | da Silva, Fábio | (no link) |
| 3 | {{sortname cell|Fábio|da Silva|Fábio Gomes da Silva}}
|
Fábio da Silva | da Silva, Fábio | Fábio Gomes da Silva |
| 4 | {{sortname cell|Fábio|da Silva||Silva, Fabio}}
|
Fábio da Silva | Silva, Fabio | Fábio da Silva |
| 5 | {{sortname cell|Fábio|da Silva||Silva, Fabio|nolink=1}}
|
Fábio da Silva | Silva, Fabio | (no link) |
| 6 | {{sortname cell|Fábio|da Silva|Fábio Gomes da Silva|Silva, Fabio}}
|
Fábio da Silva | Silva, Fabio | Fábio Gomes da Silva |
- Things you might not expect
| # | What you type | What's displayed | What's sorted | What's linked |
|---|---|---|---|---|
| - | [[Mark Evans]]
|
Mark Evans | Mark Evans | Mark Evans |
| - | [[Mark Evans (general)|Mark Evans]]
|
Mark Evans | Mark Evans (general) | Mark Evans (general) |
| 1 | Sir {{sortname cell|Mark|Evans}}
|
Mark Evans | Sir Evans, Mark | Mark Evans |
| 1 | {{sortname cell|Sir Mark|Evans}}
|
Sir Mark Evans | Evans, Sir Mark | Sir Mark Evans |
| 3 | {{sortname cell|Sir Mark|Evans|Mark Evans (general)}}
|
Sir Mark Evans | Evans, Sir Mark | Mark Evans (general) |
| 6 | {{sortname cell|Sir Mark|Evans|Mark Evans (general)|Evans, Mark}}
|
Sir Mark Evans | Evans, Mark | Mark Evans (general) |
| 1 | {{sortname cell|Fábio da|Silva}}
|
Fábio da Silva | Silva, Fábio da | Fábio da Silva |
| 2 | {{sortname cell|Fábio da|Silva|nolink=1}}
|
Fábio da Silva | Silva, Fábio da | (no link) |
| 3 | {{sortname cell|Fábio da|Silva|Fábio Gomes da Silva}}
|
Fábio da Silva | Silva, Fábio da | Fábio Gomes da Silva |
| 4 | {{sortname cell|Fábio da|Silva||Silva, Fabio}}
|
Fábio da Silva | Silva, Fabio | Fábio da Silva |
| 5 | {{sortname cell|Fábio da|Silva||Silva, Fabio|nolink=1}}
|
Fábio da Silva | Silva, Fabio | (no link) |
| 6 | {{sortname cell|Fábio da|Silva|Fábio Gomes da Silva|Silva, Fabio}}
|
Fábio da Silva | Silva, Fabio | Fábio Gomes da Silva |
Note
To link to a section within the page in which the template appears, encode the number sign:
{{sortname cell|Examples||#Examples}}
- gives: data-sort-value=", Examples" | Examples
Microformat
The HTML markup produced by this template includes an hCard microformat, which makes the person's name parsable by computers, either acting automatically to catalogue articles across Wikipedia or via a browser tool operated by a reader, to (for example) add the subject to an address book. For more information about the use of microformats on Wikipedia, please see the microformat project.
To include a URL, use {{URL}}.
Classes
The hCard in this template uses at least some of these HTML classes:
- agent
- family-name
- fn (required)
- given-name
- honorific-prefix
- honorific-suffix
- n
- nickname
- org
- url
- vcard
Please do not rename or remove these classes nor collapse nested elements which use them.
See also
- {{sortname}} – version without assumptions about where it is used - see talk for central sorting talk
- {{sort}} – see talk for central sorting talk
- {{Date table sorting}} – for using dates in sortable tables
- {{Number table sorting}} – for using alphabetic sort mode for numbers in sortable tables
- {{Last word}}
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.