Bản mẫu:Sortname
Giao diện
<span class="sortkey">{{{last}}}, {{{first}}}</span>[[{{{first}}} {{{last}}} ({{{dab}}})|{{{first}}} {{{last}}}]]
This template is deprecated. Table sort keys should now be defined using the data-sort-value attribute, like so: | data-sort-value="Doe, John" | John Doe . Please see WP:SORT § Specifying a sort key for a cell for details. |
- Cách sử dụng
{{sortname|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 é.
- Các tham số tùy chọn
|dab=định hướng
- Wikilinks to "first last (định hướng)".
(Note: ignored if optional link target is not blank.)
- Wikilinks to "first last (định hướng)".
|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.
Các ví dụ
[sửa mã nguồn]# | What you type | What's generated |
---|---|---|
1 | {{sortname|first|last}}
|
<span style="display:none;">last, first</span>[[first last]] |
2 | {{sortname|first|last|nolink=1}}
|
<span style="display:none;">last, first</span>first last |
3 | {{sortname|first|last|dab=disambiguator}}
|
<span style="display:none;">last, first</span>[[first last (disambiguator)|first last]] |
4 | {{sortname|first|last|target}}
|
<span style="display:none;">last, first</span>[[target|first last]] |
5 | {{sortname|first|last||sort}}
|
<span style="display:none;">sort</span>[[first last]] |
6 | {{sortname|first|last||sort|nolink=1}}
|
<span style="display:none;">sort</span>first last |
7 | {{sortname|first|last|target|sort}}
|
<span style="display:none;">sort</span>[[target|first last]] |
# | What you type | What's displayed | What's sorted | What's linked |
---|---|---|---|---|
1 | {{sortname|Tom|Jones}}
|
Jones, TomTom Jones | Jones, Tom | Tom Jones |
2 | {{sortname|Tom|Jones|nolink=1}}
|
Jones, TomTom Jones | Jones, Tom | (no link) |
3 | {{sortname|Tom|Jones|dab=singer}}
|
Jones, TomTom Jones | Jones, Tom | Tom Jones (singer) |
4 | {{sortname|Tom|Jones|Tom Jones (singer)}}
|
Jones, TomTom Jones | Jones, Tom | Tom Jones (singer) |
1 | {{sortname|Fábio|da Silva}}
|
da Silva, FábioFábio da Silva | da Silva, Fábio | Fábio da Silva |
2 | {{sortname|Fábio|da Silva|nolink=1}}
|
da Silva, FábioFábio da Silva | da Silva, Fábio | (no link) |
3 | {{sortname|Fábio|da Silva|Fábio Gomes da Silva}}
|
da Silva, FábioFábio da Silva | da Silva, Fábio | Fábio Gomes da Silva |
4 | {{sortname|Fábio|da Silva||Silva, Fabio}}
|
Silva, FabioFábio da Silva | Silva, Fabio | Fábio da Silva |
5 | {{sortname|Fábio|da Silva||Silva, Fabio|nolink=1}}
|
Silva, FabioFábio da Silva | Silva, Fabio | (no link) |
6 | {{sortname|Fábio|da Silva|Fábio Gomes da Silva|Silva, Fabio}}
|
Silva, FabioFá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|Mark|Evans}}
|
Sir Evans, MarkMark Evans | Sir Evans, Mark | Mark Evans |
1 | {{sortname|Sir Mark|Evans}}
|
Evans, Sir MarkSir Mark Evans | Evans, Sir Mark | Sir Mark Evans |
3 | {{sortname|Sir Mark|Evans|Mark Evans (general)}}
|
Evans, Sir MarkSir Mark Evans | Evans, Sir Mark | Mark Evans (general) |
6 | {{sortname|Sir Mark|Evans|Mark Evans (general)|Evans, Mark}}
|
Evans, MarkSir Mark Evans | Evans, Mark | Mark Evans (general) |
1 | {{sortname|Fábio da|Silva}}
|
Silva, Fábio daFábio da Silva | Silva, Fábio da | Fábio da Silva |
2 | {{sortname|Fábio da|Silva|nolink=1}}
|
Silva, Fábio daFábio da Silva | Silva, Fábio da | (no link) |
3 | {{sortname|Fábio da|Silva|Fábio Gomes da Silva}}
|
Silva, Fábio daFábio da Silva | Silva, Fábio da | Fábio Gomes da Silva |
4 | {{sortname|Fábio da|Silva||Silva, Fabio}}
|
Silva, FabioFábio da Silva | Silva, Fabio | Fábio da Silva |
5 | {{sortname|Fábio da|Silva||Silva, Fabio|nolink=1}}
|
Silva, FabioFábio da Silva | Silva, Fabio | (no link) |
6 | {{sortname|Fábio da|Silva|Fábio Gomes da Silva|Silva, Fabio}}
|
Silva, FabioFábio da Silva | Silva, Fabio | Fábio Gomes da Silva |
Ghi chú
[sửa mã nguồn]To link to a section within the page in which the template appears, encode the number sign:
{{Sortname|Các ví dụ||#Các ví dụ}}
- đưa ra: , Các ví dụCác ví dụ