Template:WorkSorter: Difference between revisions
Jump to navigation
Jump to search
Documentation
(more articles) |
(expanded documentation) |
||
Line 15: | Line 15: | ||
|#default = {{{1|{{PAGENAME}}}}} | |#default = {{{1|{{PAGENAME}}}}} | ||
}} }}</includeonly><noinclude><!-- | }} }}</includeonly><noinclude><!-- | ||
-->{{DisplayBox| | -->{{DisplayBox|title=Documentation|text= | ||
This template removes numerals, most definite and some indefinite articles from the beginning of a work title: | |||
* Numerals from <tt>1</tt> to <tt>100</tt> | |||
* English articles: <tt>the a an</tt> | |||
* French articles: <tt>la le l' les un ung une un'</tt> | |||
* German articles: <tt>das die der den dem</tt> | |||
* Italian articles: <tt>il lo la l' i gli le</tt> | |||
* Portuguese articles: <tt>o a os as</tt> | |||
* Spanish articles: <tt>lo la los las</tt> | |||
'''Syntax:''' | '''Syntax:''' | ||
: <tt><nowiki>{{WorkSorter}}</nowiki></tt> returns the contents of <tt><nowiki>{{PAGENAME}}</nowiki></tt> after processing it. | : <tt><nowiki>{{WorkSorter}}</nowiki></tt> | ||
returns the contents of <tt><nowiki>{{PAGENAME}}</nowiki></tt> after processing it. | |||
'''Syntax with an optional parameter:''' | '''Syntax with an optional parameter:''' | ||
: <tt><nowiki>{{WorkSorter| | : <tt><nowiki>{{WorkSorter|Ung jour viendra (Nicolas Gombert)}}</nowiki></tt> | ||
returns "{{WorkSorter|Ung jour viendra (Nicolas Gombert)}}" | |||
This template can be used | This template can be used as a parameter for the magic word <tt><nowiki>DEFAULTSORT</nowiki></tt> in works pages, to produce an appropriate sort key. | ||
: <tt><nowiki>{{DEFAULTSORT:{{WorkSorter}}}}</nowiki></tt> | : <tt><nowiki>{{DEFAULTSORT:{{WorkSorter}}}}</nowiki></tt> | ||
===See also=== | |||
*{{tl|NameSorter}} | |||
}} | }} | ||
[[Category:Templates | |||
[[Category:Templates]] | |||
</noinclude> | </noinclude> |
Revision as of 15:04, 14 May 2013
This template removes numerals, most definite and some indefinite articles from the beginning of a work title:
- Numerals from 1 to 100
- English articles: the a an
- French articles: la le l' les un ung une un'
- German articles: das die der den dem
- Italian articles: il lo la l' i gli le
- Portuguese articles: o a os as
- Spanish articles: lo la los las
Syntax:
- {{WorkSorter}}
returns the contents of {{PAGENAME}} after processing it.
Syntax with an optional parameter:
- {{WorkSorter|Ung jour viendra (Nicolas Gombert)}}
returns "Jour viendra (Nicolas Gombert)"
This template can be used as a parameter for the magic word DEFAULTSORT in works pages, to produce an appropriate sort key.
- {{DEFAULTSORT:{{WorkSorter}}}}
See also
- {{NameSorter}}