Template:CompCatTxt: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(tweak)
m (not really necessary to be hidden)
(23 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This is category provides a {{switch|{{{complete}}}|case: yes=complete|case: no=partial|default=partial}} list of the works on CPDL by {{{1|<composer given name(s)>}}} {{{2|<composer surname>}}}, sorted alphabetically by title of the works pages. For the composer page itself{{switch|{{{sort|none}}}
<includeonly>This category provides a list of [[{{#sub:{{PAGENAME}}||-13}}]] works on CPDL, sorted alphabetically by title of the works pages{{#if:{{{sort|}}}|. See the composer page for a list of works sorted by {{{sort}}}}}.
|case: none=,
|default=, with works sorted by {{{sort}}},}} [[{{{1}}} {{{2}}}|click here]].
<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>
[[Category:Templates|{{PAGENAME}}]]<br><br>{{prot-temp}}<br><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>


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  is optional.
[[Category:Composer works categories|{{{1|{{NameSorter|{{#sub:{{PAGENAME}}||-13}}}} }}}]]</includeonly><noinclude>
{{prot-temp}}<br>
{{DisplayBox|bgcolor=g|text=
<center><big>'''Usage'''</big></center>


'''Syntax with the first two parameters only:'''
'''Syntax:'''
: <tt><nowiki>{{CompCatTxt|John|Dowland}}</nowiki></tt>
:{{tl|CompCatTxt}}
which inserts
which inserts the text
: <tt><nowiki>This is category lists the works on CPDL by John Dowland, sorted alphabetically by title of the works pages. For the composer page itself, [[John Dowland|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 page name. The page is included in category {{CiteCat|Composer works categories}}, sorted by ''<composer>'''s last name.


:This is category lists the works on CPDL by John Dowland, sorted alphabetically by title of the works pages. For the composer page itself, <font color=blue>click here</font>.
'''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".


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).
}}


'''Syntax with all parameters:'''
[[Category:Category header templates]]
: <tt><nowiki>{{CompCatTxt|John|Dowland|publication}}</nowiki></tt>
which inserts
: <tt><nowiki>This is category lists the works on CPDL by John Dowland, 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 is category lists the works on CPDL by John Dowland, sorted alphabetically by title of the works pages. For the composer page itself, with works sorted by publication, <font color=blue>click here</font>.
 
</div>
</noinclude>
</noinclude>

Revision as of 03:19, 3 November 2014


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).