Template:CompCatTxt: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(changed to hide the category when no parameter is passed. still needs to categorize the hidden categories)
No edit summary
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{2|}}}|
<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}}}.}}
This category provides a list of [[{{{1}}} {{{2}}}]] works on CPDL, sorted alphabetically by title of the works pages. For the composer page itself{{#if:{{{sort|}}}|, with works sorted by {{{sort}}},|,}} [[{{{1}}} {{{2}}}|click here]].
{{#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]]).
{{#dpl:category={{#dplvar:conam}} arrangements|notcategory={{#dplvar:conam}} compositions|namespace=|ordermethod=sortkey|columns=3}}}}
<hr>
[[Category:Composer works categories|{{{1|{{NameSorter|{{#dplvar:conam}}}}}}}]]</includeonly><noinclude>{{prot-temp}}<br>
{{DisplayBox|bgcolor=g|text=
<center><big>'''Usage'''</big></center>


[[Category:Compositions by composer|{{{2}}}, {{{1}}}]]
'''Syntax:'''
| __HIDDENCAT__ }}</includeonly><noinclude>
:{{tl|CompCatTxt}}
{{prot-temp}}<br>
which inserts the text
<div><div style="margin: 0; margin-right: 30px; margin-left: 30px; border: 1px solid #1188ff; padding: 1em 1em 1em 1em; background-color:#ddffdd">
:This category provides a list of ''<composer>'' works on CPDL, sorted alphabetically by title of the works pages.
<center><big>'''Documentation'''</big></center>
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.


This template is for adding the generic descriptive information for [[:Category:Compositions by composer|compositions by composer categories]]. There are three parameters: the first two are required and the other is optional.
'''Syntax with sort key:'''
:{{tl|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 {{CiteCat|Composer works categories}}, using the sort key "Vaughan Williams, Ralph".


'''Syntax example, with the first two parameters only:'''
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).
<pre>{{CompCatTxt|John|Ireland}}</pre>
}}
which inserts
: <tt><nowiki>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]].</nowiki></tt>
into a file, appearing as


:This category provides a 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>.
[[Category:Category header templates]]
 
'''Syntax example with additional parameter: sort=<sortmethod>'''
<pre>{{CompCatTxt|John|Dowland|sort=publication}}</pre>
which inserts
: <tt><nowiki>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]].</nowiki></tt>
into a file, appearing as
 
:This category provides a 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>.
 
'''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>
[[Category:Templates|{{PAGENAME}}]]
</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).