Template:CompCatTxt: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(text to be displayed in the hidden categories)
(expanded documentation)
Line 7: Line 7:
[[Category:Hidden Compositions by composer categories|{{{1|{{LastName|{{#sub:{{PAGENAME}}||-13}}}} }}}]] __HIDDENCAT__ }}</includeonly><noinclude>
[[Category:Hidden Compositions by composer categories|{{{1|{{LastName|{{#sub:{{PAGENAME}}||-13}}}} }}}]] __HIDDENCAT__ }}</includeonly><noinclude>
{{prot-temp}}<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">
{{DisplayBox|bgcolor=g|text=
<center><big>'''Documentation'''</big></center>
<center><big>'''Documentation'''</big></center>


Line 14: Line 14:
'''Syntax example, 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 the text
: <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>
: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 <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 example with additional parameter: sort=<sortmethod>'''
'''Syntax example with additional parameter: sort=<sortmethod>'''
<pre>{{CompCatTxt|John|Dowland|sort=publication}}</pre>
<pre>{{CompCatTxt|John|Dowland|sort=publication}}</pre>
which inserts
which inserts the text
: <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>
: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 <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.
}}
{{DisplayBox|bgcolor=r|text=
<center><big>'''Alternative usage'''</big></center>


'''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.
'''Syntax:'''
</div>
<pre>{{CompCatTxt}}</pre>
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|Hidden Compositions by composer categories}}, sorted by ''<composer>'''s last name.
 
'''Syntax with sort key:'''
<pre>{{CompCatTxt|Vaughan Williams, Ralph}}</pre>
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|Hidden Compositions by composer 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).
}}
[[Category:Templates|{{PAGENAME}}]]
[[Category:Templates|{{PAGENAME}}]]
</noinclude>
</noinclude>

Revision as of 14:24, 12 May 2009


Documentation

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

Syntax example, with the first two parameters only:

{{CompCatTxt|John|Ireland}}

which inserts the text

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 the text

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.

Alternative 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 Hidden Compositions by composer 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 Hidden Compositions by composer 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).