Template:Acap: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(add documentation on optional second parameter 2=<sort key>)
(change sort key param to 9=<sort key>; previous param (2) detection on)
Line 1: Line 1:
'''Instruments:''' [[:Category:a cappella|''a cappella'']]{{{1|.}}}<br>
'''Instruments:''' [[:Category:a cappella|''a cappella'']]{{{1|.}}}<br>
<includeonly>[[Category:a_cappella|{{{2|{{PAGENAME}}}}}]]</includeonly><noinclude>[[Category:Templates|{{PAGENAME}}]]</noinclude><noinclude><br><div><div style="margin: 0; margin-right: 30px; margin-left: 30px; border: 1px solid #1188ff; padding: 1em 1em 1em 1em; background-color:#ddffdd">
<includeonly>[[Category:a_cappella|{{{9|{{PAGENAME}}}}}]][[Category:Good-bad|{{{2|*}}}]]</includeonly><noinclude>[[Category:Templates|{{PAGENAME}}]]</noinclude><noinclude><br><div><div style="margin: 0; margin-right: 30px; margin-left: 30px; border: 1px solid #1188ff; padding: 1em 1em 1em 1em; background-color:#ddffdd">
<center><big>'''Documentation'''</big></center>
<center><big>'''Documentation'''</big></center>


Line 32: Line 32:


'''Syntax with a sort key parameter (and no extra information parameter):'''
'''Syntax with a sort key parameter (and no extra information parameter):'''
: <tt><nowiki>{{acap|2=<sort key>}}</nowiki></tt>
: <tt><nowiki>{{acap|9=<sort key>}}</nowiki></tt>
which inserts
which inserts
: <tt><nowiki>'''Instruments:''' [[:Category:a cappella|''a cappella'']].<br>[[Category:a_cappella|<sort key>]]</nowiki></tt>
: <tt><nowiki>'''Instruments:''' [[:Category:a cappella|''a cappella'']].<br>[[Category:a_cappella|<sort key>]]</nowiki></tt>
Line 38: Line 38:


'''Syntax with both parameters:'''
'''Syntax with both parameters:'''
: <tt><nowiki>{{acap|<value>|<sort key}}</nowiki></tt>
: <tt><nowiki>{{acap|<value>|9=<sort key}}</nowiki></tt>
which inserts
which inserts
: <tt><nowiki>'''Instruments:''' [[:Category:a cappella|''a cappella'']]<value><br>[[Category:a_cappella|<sort key>]]</nowiki></tt>
: <tt><nowiki>'''Instruments:''' [[:Category:a cappella|''a cappella'']]<value><br>[[Category:a_cappella|<sort key>]]</nowiki></tt>
into a file.
into a file.


In both of these latter two instances, the page is sorted in [[:Category:a cappella]] with <sort key> as the the sort key (instead of the default {{PAGENAME}} sort key).
In both of these latter two instances, the page is sorted in [[:Category:a cappella]] with <sort key> as the the sort key (instead of the default <nowiki>{{PAGENAME}}</nowiki> sort key).


As examples,
As examples,
: <tt><nowiki>{{acap|2=Haven, The (Charles Villiers Stanford))}}<br></nowiki></tt>
: <tt><nowiki>{{acap|9=Haven, The (Charles Villiers Stanford))}}<br></nowiki></tt>
on the page [[The Haven (Charles Villiers Stanford)]] produces
on the page [[The Haven (Charles Villiers Stanford)]] produces


Line 52: Line 52:


with the page sorted under "H" rather than under "T".  Or,
with the page sorted under "H" rather than under "T".  Or,
: <tt><nowiki>{{acap|, with optional {{PnoAcc|piano}} accompaniment.|Haven, The (Charles Villiers Stanford))}}<br></nowiki></tt>
: <tt><nowiki>{{acap|, with optional {{PnoAcc|piano}} accompaniment.|9=Haven, The (Charles Villiers Stanford))}}<br></nowiki></tt>
on the page [[The Haven (Charles Villiers Stanford)]] produces
on the page [[The Haven (Charles Villiers Stanford)]] produces



Revision as of 06:26, 6 May 2008

Instruments: a cappella.

Documentation

This template is for specifying a work as being a cappella, or possibly a cappella with extra information. In every instance, page is categorized in Category:a cappella, with the option to specify a sort key (differing from the default) for the listing in Category:a cappella.

Syntax, without any paramter:

{{acap}}

which inserts

'''Instruments:''' [[:Category:a cappella|''a cappella'']].<br>[[Category:a_cappella|{{PAGENAME}}]]

into a file, appearing as

Instruments: a cappella. (followed by a linebreak)

Syntax, with an extra information parameter:

{{acap|<value>}}

which inserts

'''Instruments:''' [[:Category:a cappella|''a cappella'']]<value><br>[[Category:a_cappella|{{PAGENAME}}]]

into a file, appearing as

Instruments: a cappella<value> (followed by a linebreak)

For example,

{{acap|, or optional kazoo.}}

produces

Instruments: a cappella, or optional kazoo. (followed by a linebreak)

Syntax with a sort key parameter (and no extra information parameter):

{{acap|9=<sort key>}}

which inserts

'''Instruments:''' [[:Category:a cappella|''a cappella'']].<br>[[Category:a_cappella|<sort key>]]

into a file.

Syntax with both parameters:

{{acap|<value>|9=<sort key}}

which inserts

'''Instruments:''' [[:Category:a cappella|''a cappella'']]<value><br>[[Category:a_cappella|<sort key>]]

into a file.

In both of these latter two instances, the page is sorted in Category:a cappella with <sort key> as the the sort key (instead of the default {{PAGENAME}} sort key).

As examples,

{{acap|9=Haven, The (Charles Villiers Stanford))}}<br>

on the page The Haven (Charles Villiers Stanford) produces

Instruments: a cappella. (followed by a linebreak)

with the page sorted under "H" rather than under "T". Or,

{{acap|, with optional {{PnoAcc|piano}} accompaniment.|9=Haven, The (Charles Villiers Stanford))}}<br>

on the page The Haven (Charles Villiers Stanford) produces

Instruments: a cappella, with optional piano accompaniment. (followed by a linebreak)

Again, the page is sorted in Category:a cappella under "H" rather than under "T".

Note: In this last example the Template:PnoAcc gets expanded properly.