Template:CompCatTxt: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(change wording (so that something like "Gregorian chant" as the composer surname does not result in awkward reading)
No edit summary
 
(22 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This category provides a {{switch|{{{complete}}}|case: yes=complete|case: no=partial|default=partial}} list of [[{{{1}}} {{{2}}}]] works on CPDL, sorted alphabetically by title of the works pages. For the composer page itself{{switch|{{{sort|none}}}
<includeonly>{{#dplvar:set|conam|{{#sub:{{PAGENAME}}||-13}}}}This category provides a list of [[{{#dplvar:conam}}]] works on CPDL, sorted alphabetically by title of the works pages.{{#if:{{{sort|}}}| See [[{{#dplvar:conam}}|the composer page]] for a list of works sorted by {{{sort}}}.}}
|case: none=,
{{#ifexist:Category:{{#dplvar:conam}} arrangements|<hr>Following is a list of {{#dpl:category={{#dplvar:conam}} arrangements|notcategory={{#dplvar:conam}} compositions|namespace=|mode=userformat|resultsheader=%TOTALPAGES%}} works, arranged by {{#sub:{{PAGENAME}}||-13}}, that are not shown below. (extracted from [[:Category:{{#dplvar:conam}} arrangements]]).
|default=, with works sorted by {{{sort}}},}} [[{{{1}}} {{{2}}}|click here]].
{{#dpl:category={{#dplvar:conam}} arrangements|notcategory={{#dplvar:conam}} compositions|namespace=|ordermethod=sortkey|columns=3}}}}
<includeonly>[[Category:{{switch|{{{complete|no}}}|case: yes=Compositions by composer|case: no=Compositions by composer (incomplete)|default=Compositions by composer (incomplete)}}|{{{2}}}, {{{1}}}]]</includeonly><noinclude>
<hr>
[[Category:Templates|{{PAGENAME}}]]<br><br>{{prot-temp}}<br><br>
[[Category:Composer works categories|{{{1|{{NameSorter|{{#dplvar:conam}}}}}}}]]</includeonly><noinclude>{{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">
{{DisplayBox|bgcolor=g|text=
<center><big>'''Documentation'''</big></center>
<center><big>'''Usage'''</big></center>


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:'''
:{{tl|CompCatTxt}}
which inserts the text
:This category provides a list of ''<composer>'' works on CPDL, sorted alphabetically by title of the works pages.
The ''<composer>'' field is automatically extracted from the page name. The page is included in category {{CiteCat|Composer works categories}}, sorted by ''<composer>'''s last name.


'''Syntax eample, with the first two parameters only:'''
'''Syntax with sort key:'''
<pre>{{CompCatTxt|John|Ireland}}</pre>
:{{tl|CompCatTxt|Vaughan Williams, Ralph}}
which inserts
which inserts the text
: <tt><nowiki>This category provides a partial list of [[John Ireland]] works on CPDL, sorted alphabetically by title of the works pages. For the composer page itself, [[John Ireland|click here]].</nowiki></tt>
:This category provides a list of ''<composer>'' works on CPDL, sorted alphabetically by title of the works pages.
into a file, appearing as
The ''<composer>'' field is automatically extracted from the category's name. The page is included in category {{CiteCat|Composer works categories}}, using the sort key "Vaughan Williams, Ralph".
 
:This category provides a partial list of <font color=blue>John Ireland</font> works on CPDL, sorted alphabetically by title of the works pages. For the composer page itself, <font color=blue>click here</font>.
 
'''Syntax examples, with additional parameters: sort=<sortmethod>, complete=yes/no (default=no)'''
<pre>{{CompCatTxt|John|Dowland|sort=publication|complete=no}}</pre>
or simply
<pre>{{CompCatTxt|John|Dowland|sort=publication}}</pre>
which inserts
: <tt><nowiki>This category provides a partial 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]].</nowiki></tt>
into a file, appearing as
 
:This category provides a partial list of <font color=blue>John Dowland</font> works on CPDL, sorted alphabetically by title of the works pages. For the composer page itself, with works sorted by publication, <font color=blue>click here</font>.
 
<pre>{{CompCatTxt|John|Dowland|sort=publication|complete=yes}}</pre>
which inserts
: <tt><nowiki>This category provides a complete 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]].</nowiki></tt>
into a file, appearing as
 
:This category provides a complete list of <font color=blue>John Dowland</font> works on CPDL, sorted alphabetically by title of the works pages. For the composer page itself, with works sorted by publication, <font color=blue>click here</font>.
 
<pre>{{CompCatTxt|John|Ireland|complete=yes}}</pre>
which inserts
: <tt><nowiki>This category provides a complete list of [[John Ireland]] works on CPDL, sorted alphabetically by title of the works pages. For the composer page itself, [[John Ireland|click here]].</nowiki></tt>
into a file, appearing as
 
:This category provides a complete list of <font color=blue>John Ireland</font> works on CPDL, sorted alphabetically by title of the works pages. For the composer page itself, <font color=blue>click here</font>.
 
'''To summarize:'''  Omitting sort=<sortmethod> leaves out the phrase "with works sorted by <sortmethod>," - and either omitting complete=yes or setting complete=no makes the description start "This category provides a partial list..." = while setting complete=yes makes the description start "This category provide a complete list..."
</div>


In both cases, the category link ("''<composer>''_compositions") becomes hidden in the works pages (because the information contained in it is supposedly in the same order than that found in the composer page).
}}


[[Category:Category header templates]]
</noinclude>
</noinclude>

Latest revision as of 19:32, 18 July 2021


Usage

Syntax:

{{CompCatTxt}}

which inserts the text

This category provides a list of <composer> works on CPDL, sorted alphabetically by title of the works pages.

The <composer> field is automatically extracted from the page name. The page is included in category Composer works categories, sorted by <composer>'s last name.

Syntax with sort key:

{{CompCatTxt|Vaughan Williams, Ralph}}

which inserts the text

This category provides a list of <composer> works on CPDL, sorted alphabetically by title of the works pages.

The <composer> field is automatically extracted from the category's name. The page is included in category Composer works categories, using the sort key "Vaughan Williams, Ralph".

In both cases, the category link ("<composer>_compositions") becomes hidden in the works pages (because the information contained in it is supposedly in the same order than that found in the composer page).