Template:WorkSorter: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(new, still being developed)
 
(first try)
Line 1: Line 1:
<includeonly>{{{1|{{PAGENAME}}}}}</includeonly><noinclude><!--
<includeonly>{{#switch: {{lc:{{#explode:{{{1|{{PAGENAME}}}}}||0}} }}
| 1| 2| 3| 4| 5| 6| 7| 8| 9|10|11|12|13|14|15|16|17|18|19|20
|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40
|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60
|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
|the|das|die|der|den|dem|la|le|lo|il|a|as|o|os = {{ucfirst: {{#sub:{{{1|{{PAGENAME}}}}}|{{#pos:{{{1|{{PAGENAME}}}}}|{{#explode:{{{1|{{PAGENAME}}}}}||1}} }} }} }}
|#default = {{{1|{{PAGENAME}}}}}
}}</includeonly><noinclude><!--
-->{{DisplayBox|bgcolor=g|text=
-->{{DisplayBox|bgcolor=g|text=
A simple template that removes initial numerals and articles from the work title.
A simple template that removes initial numerals and articles from the work title.

Revision as of 19:24, 12 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}}}}