Template:WorkSorter: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(Italian plurals)
(more articles)
Line 5: Line 5:
|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80
|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80
|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100
|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100
|the|das|die|der|den|dem|la|le|lo|il|i|gli|a|as|o|os = {{ucfirst: {{#sub:{{{1|{{PAGENAME}}}}}|{{#pos:{{{1|{{PAGENAME}}}}}|{{#explode:{{{1|{{PAGENAME}}}}}||1}} }} }} }}
|the|a|an<!-- English -->
|das|die|der|den|dem<!-- German -->
|la|le|les|un|ung|une<!-- French -->
|lo|los|las<!-- Spanish -->
|il|i|gli<!-- Italian -->
|as|o|os<!-- Portuguese --> = {{ucfirst: {{#sub:{{{1|{{PAGENAME}}}}}|{{#pos:{{{1|{{PAGENAME}}}}}|{{#explode:{{{1|{{PAGENAME}}}}}||1}} }} }} }}
|#default = {{#switch: {{lc:{{#explode:{{{1|{{PAGENAME}}}}}|&#39;|0}} }}
|#default = {{#switch: {{lc:{{#explode:{{{1|{{PAGENAME}}}}}|&#39;|0}} }}
|l|un = {{ucfirst: {{#sub:{{{1|{{PAGENAME}}}}}|{{#pos:{{{1|{{PAGENAME}}}}}|{{#explode:{{{1|{{PAGENAME}}}}}|&#39;|1}} }} }} }}
|l|un = {{ucfirst: {{#sub:{{{1|{{PAGENAME}}}}}|{{#pos:{{{1|{{PAGENAME}}}}}|{{#explode:{{{1|{{PAGENAME}}}}}|&#39;|1}} }} }} }}

Revision as of 19:55, 17 August 2012

A simple template that removes initial numerals and articles from the work title.

Syntax:

{{WorkSorter}} returns the contents of {{PAGENAME}} after processing it.

Syntax with an optional parameter:

{{WorkSorter|2 Tantum Ergo (Franz Schöpf)}} returns "Tantum Ergo (Franz Schöpf)"


This template can be used in conjunction with the magic word DEFAULTSORT inside Works pages, to produce an appropriate sort key.

{{DEFAULTSORT:{{WorkSorter}}}}