Template:Composer: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(remove nonbreakable space ... space can be inserted optionally (or not, since sometimes a comma or other punctuation may be part of optional parameter), tidy documentation)
(create a new set of categories for arrangements, as discussed at User talk:Bcjohnston523#Arrangers' categories)
(29 intermediate revisions by 3 users not shown)
Line 1: Line 1:
'''Composer:''' [[{{{1}}}]]{{{2|}}}<br><includeonly>[[Category:{{{1}}} compositions]]</includeonly><noinclude><div><div style="margin: 0; margin-right: 30px; margin-left: 30px; border: 1px solid #3399ff; padding: 1em 1em 1em 1em; background-color:#ddffdd">
<includeonly>{{#switch:{{{1}}}
<center><big>'''Documentation'''</big></center>
|2='''{{{composertype|{{{composertype1|Composer}}}}}}s:''' [[{{{2}}}]] and [[{{{3}}}]]{{{4|}}} {{IfMain|[[Category:{{{2}}} compositions]][[Category:{{{3}}} compositions]][[Category:Works by multiple composers]]{{#ifeq:{{{composertype}}}|Arranger|[[Category:{{{2}}} arrangements]][[Category:{{{3}}} arrangements]]}} }}
|3='''{{{composertype|{{{composertype1|Composer}}}}}}s:''' [[{{{2}}}]], [[{{{3}}}]] and [[{{{4}}}]]{{{5|}}} {{IfMain|[[Category:{{{2}}} compositions]][[Category:{{{3}}} compositions]][[Category:{{{4}}} compositions]][[Category:Works by multiple composers]]{{#ifeq:{{{composertype}}}|Arranger|[[Category:{{{2}}} arrangements]][[Category:{{{3}}} arrangements]][[Category:{{{4}}} arrangements]]}} }}
|4='''{{{composertype|{{{composertype1|Composer}}}}}}s:''' [[{{{2}}}]], [[{{{3}}}]], [[{{{4}}}]] and [[{{{5}}}]]{{{6|}}} {{IfMain|[[Category:{{{2}}} compositions]][[Category:{{{3}}} compositions]][[Category:{{{4}}} compositions]][[Category:{{{5}}} compositions]][[Category:Works by multiple composers]]{{#ifeq:{{{composertype}}}|Arranger|[[Category:{{{2}}} arrangements]][[Category:{{{3}}} arrangements]][[Category:{{{4}}} arrangements]][[Category:{{{5}}} arrangements]]}} }}
|#default='''{{{composertype|{{{composertype1|Composer}}}}}}:''' {{#ifexist:{{{1}}}
|{{#switch:{{{1}}}
|Ambrosian chant
|Gregorian chant
|Kievan chant
|Yaroslav chant
|Znamenny chant
|Traditional=[[{{{1}}}|Anonymous ({{{1}}})]]
|#default=[[{{{1}}}]]}}
|{{{1}}}<small><sup>[{{fullurl:{{{1}}}|action=edit&preload=Template:New_composer/Preload}} create page]</sup></small>[[Category:Works with nonexistent composer page]]}}{{{2|}}} {{IfMain|[[Category:{{{1}}} compositions]]{{#ifeq:{{{composertype}}}|Arranger|[[Category:{{{1}}} arrangements]]}} }}
}}<br></includeonly><noinclude>
{{prot-temp}}<br>
{{DisplayBox|title=Documentation|text=


'''Syntax, with the one required parameter:'''
'''Accepted syntaxes for this template:'''
: <tt><nowiki>{{Composer|Carlo Gesualdo}}</nowiki></tt>
* {{tl|Composer|''Carlo Gesualdo''}}
which produces the text
:which produces the text
: '''Composer:''' [[Carlo Gesualdo]]
:: '''Composer:''' [[Carlo Gesualdo]]
and inserts the page in [[:Category:Carlo Gesualdo compositions]]
:and inserts the page in category {{CiteCat|Carlo Gesualdo compositions}}


'''Syntax with required and optional parameters:'''
* {{tl|Composer|''Anonymous''|'', early-16th Century composer''}}
: <tt><nowiki>{{Composer|Anonymous|, early-16th Century composer}}</nowiki></tt>
:which produces the text
which produces the text
:: '''Composer:''' [[Anonymous]], early-16th Century composer
: '''Composer:''' [[Anonymous]], early-16th Century composer
:and inserts the page in category {{CiteCat|Anonymous compositions}}
and inserts the page in [[:Category:Anonymous compositions]]


</div>[[Category:Templates|{{PAGENAME}}]]</noinclude>
 
'''Syntaxes for more than one composer (up to 4):'''
* {{tl|Composer|''2''|''composer1''|''composer2''|''optional_text''}}
:which produces the text
:: '''Composers:''' <font color=blue>Composer1</font> and <font color=blue>Composer2</font>
:and inserts the page in categories <font color=blue>Composer1 compositions</font> and <font color=blue>Composer2 compositions</font>
 
* {{tl|Composer|''3''|''composer1''|''composer2''|''composer3''|''optional_text''}}
:which produces the text
:: '''Composers:''' <font color=blue>Composer1</font>, <font color=blue>Composer2</font> and <font color=blue>Composer3</font>
:and inserts the page in categories <font color=blue>Composer1 compositions</font>, <font color=blue>Composer2 compositions</font> and <font color=blue>Composer3 compositions</font>
}}
 
[[Category:Templates]]</noinclude>

Revision as of 03:36, 9 June 2019


Documentation

Accepted syntaxes for this template:

which produces the text
Composer: Carlo Gesualdo
and inserts the page in category Carlo Gesualdo compositions
  • {{Composer|Anonymous|, early-16th Century composer}}
which produces the text
Composer: Anonymous, early-16th Century composer
and inserts the page in category Anonymous compositions


Syntaxes for more than one composer (up to 4):

  • {{Composer|2|composer1|composer2|optional_text}}
which produces the text
Composers: Composer1 and Composer2
and inserts the page in categories Composer1 compositions and Composer2 compositions
  • {{Composer|3|composer1|composer2|composer3|optional_text}}
which produces the text
Composers: Composer1, Composer2 and Composer3
and inserts the page in categories Composer1 compositions, Composer2 compositions and Composer3 compositions