Template:CompCatTxt: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(disable "complete=yes or no" parameter - completeness is ensured by Template:Composer)
(added tests to check whether parameters are passed.)
Line 1: Line 1:
This category provides a list of [[{{{1}}} {{{2}}}]] works on CPDL, sorted alphabetically by title of the works pages. For the composer page itself{{switch|{{{sort|none}}}
This category provides a list of [[{{#if:{{{1|}}}|{{{1}}} {{{2}}}|{{#sub:{{PAGENAME}}||-13}}}}]] works on CPDL, sorted alphabetically by title of the works pages. For the composer page itself{{switch|{{{sort|none}}}
|case: none=,
|case: none=,
|default=, with works sorted by {{{sort}}},}} [[{{{1}}} {{{2}}}|click here]].
|default=, with works sorted by {{{sort}}},}} [[{{#if:{{{1|}}}|{{{1}}} {{{2}}}|{{#sub:{{PAGENAME}}||-13}}}}|click here]].
<includeonly>[[Category:Compositions by composer|{{{2}}}, {{{1}}}]]</includeonly><noinclude>
<includeonly>{{#if:{{{1|}}}|[[Category:Compositions by composer|{{{2}}}, {{{1}}}]]}}</includeonly><noinclude>
[[Category:Templates|{{PAGENAME}}]]<br><br>{{prot-temp}}<br><br>
[[Category:Templates|{{PAGENAME}}]]<br><br>{{prot-temp}}<br>
<div><div style="margin: 0; margin-right: 30px; margin-left: 30px; border: 1px solid #1188ff; padding: 1em 1em 1em 1em; background-color:#ddffdd">
<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 9: Line 9:
This template is for adding the generic descriptive information for [[:Category:Compositions by composer|compositions by composer categories]]. There are four parameters: the first two are required and the other two are optional.
This template is for adding the generic descriptive information for [[:Category:Compositions by composer|compositions by composer categories]]. There are four parameters: the first two are required and the other two are optional.


'''Syntax eample, with the first two parameters only:'''
'''Syntax example, with the first two parameters only:'''
<pre>{{CompCatTxt|John|Ireland}}</pre>
<pre>{{CompCatTxt|John|Ireland}}</pre>
which inserts
which inserts
Line 27: Line 27:
'''Note:''' The discontinued parameter <tt>complete{{eq}}yes (or no)</tt> now has no effect, since the {{CiteTemp|Composer}} template keeps the lists provided by these "<Composer Name> compositions" categories up to date.
'''Note:''' The discontinued parameter <tt>complete{{eq}}yes (or no)</tt> now has no effect, since the {{CiteTemp|Composer}} template keeps the lists provided by these "<Composer Name> compositions" categories up to date.
</div>
</div>
</noinclude>
</noinclude>

Revision as of 16:18, 26 April 2009

This category provides a list of [[]] works on CPDL, sorted alphabetically by title of the works pages. For the composer page itself, [[|click here]].


Documentation

This template is for adding the generic descriptive information for compositions by composer categories. There are four parameters: the first two are required and the other two are optional.

Syntax example, with the first two parameters only:

{{CompCatTxt|John|Ireland}}

which inserts

This category provides a list of [[John Ireland]] works on CPDL, sorted alphabetically by title of the works pages. For the composer page itself, [[John Ireland|click here]].

into a file, appearing as

This category provides a list of John Ireland works on CPDL, sorted alphabetically by title of the works pages. For the composer page itself, click here.

Syntax example with additional parameter: sort=<sortmethod>

{{CompCatTxt|John|Dowland|sort=publication}}

which inserts

This category provides a list of [[John Dowland]] works on CPDL, sorted alphabetically by title of the works pages. For the composer page itself, with works sorted by publication, [[John Dowland|click here]].

into a file, appearing as

This category provides a list of John Dowland works on CPDL, sorted alphabetically by title of the works pages. For the composer page itself, with works sorted by publication, click here.

Note: The discontinued parameter complete=yes (or no) now has no effect, since the Composer template keeps the lists provided by these "<Composer Name> compositions" categories up to date.