Template:Composer: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(extended to accept up to 3 composers)
(updated documentation)
Line 8: Line 8:
<center><big>'''Documentation'''</big></center>
<center><big>'''Documentation'''</big></center>


'''Syntax, with the one required parameter:'''
'''Accepted syntaxes for this template:'''
: <tt><nowiki>{{Composer|Carlo Gesualdo}}</nowiki></tt>
* <tt><nowiki>{{Composer|</nowiki>''Carlo Gesualdo''}}</tt>
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 first optional parameters:'''
* <tt><nowiki>{{Composer|</nowiki>''Anonymous''|'', early-16th Century composer''}}</tt>
: <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]]


'''Syntax with required and optional sortkey parameters:'''
* <tt><nowiki>{{Composer|</nowiki>''Traditional''|''9=Riddle Song, The''}}</tt>
: <tt><nowiki>{{Composer|Traditional|9=Riddle Song, The}}</nowiki></tt>
:which produces the text
which produces the text
:: '''Composer:''' [[Traditional]]  
: '''Composer:''' [[Traditional]] and inserts the page in [[:Category:Traditional compositions]], sorted under "Riddle Song, The".
:and inserts the page in category {{CiteCat|Traditional compositions}}, sorted under "Riddle Song, The".


One can also use both optional parameters.
'''Syntaxes for more than one composer:'''
* <tt><nowiki>{{Composer|</nowiki>''2''|''composer_1''|''composer_2''|''optional_text''|''9=optional_sortkey''}}</tt>
:which produces the text
:: '''Composers:''' [[Composer_1]] and [[Composer_2]]
:and inserts the page in categories {{CiteCat|Composer_1 compositions}} and {{CiteCat|Composer_2 compositions}}
 
* <tt><nowiki>{{Composer|</nowiki>''3''|''composer_1''|''composer_2''|''composer_3''|''optional_text''|''9=optional_sortkey''}}</tt>
:which produces the text
:: '''Composers:''' [[Composer_1]], [[Composer_2]] and [[Composer_3]]
:and inserts the page in categories {{CiteCat|Composer_1 compositions}}, {{CiteCat|Composer_2 compositions}} and {{CiteCat|Composer_3 compositions}}


</div>[[Category:Templates|{{PAGENAME}}]]</noinclude>
</div>[[Category:Templates|{{PAGENAME}}]]</noinclude>

Revision as of 17:57, 17 November 2008

Composer: [[{{{1}}}]]


Documentation

Accepted syntaxes for this template:

  • {{Composer|Carlo Gesualdo}}
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
  • {{Composer|Traditional|9=Riddle Song, The}}
which produces the text
Composer: Traditional
and inserts the page in category Traditional compositions, sorted under "Riddle Song, The".

Syntaxes for more than one composer:

  • {{Composer|2|composer_1|composer_2|optional_text|9=optional_sortkey}}
which produces the text
Composers: Composer_1 and Composer_2
and inserts the page in categories Composer_1 compositions and Composer_2 compositions
  • {{Composer|3|composer_1|composer_2|composer_3|optional_text|9=optional_sortkey}}
which produces the text
Composers: Composer_1, Composer_2 and Composer_3
and inserts the page in categories Composer_1 compositions, Composer_2 compositions and Composer_3 compositions