Template:MultiPubList: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
No edit summary
(Version 15e)
(32 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>
<noinclude>{{prot-temp}}</noinclude><includeonly>
{{#dplvar:set|plc|{{CompFromWorkTitle|{{PAGENAME}}}}}}
{{#ifeq:{{#pos:{{PAGENAME}}|#39;}}||{{#dplvar:set|pnc|{{PAGENAME}}}}|{{#dplvar:set|pnc|{{#multireplace:{{PAGENAME}}|/^([^#39;]*)(#39;)(.*)$/=$1$3|&=,}}}}}}
{{#ifeq:{{#pos:{{PAGENAME}}|#39;}}||{{#dplvar:set|pnc|{{PAGENAME}}}}|{{#dplvar:set|pnc|{{#multireplace:{{PAGENAME}}|/^([^#39;]*)(#39;)(.*)$/=$1$3|&=,}}}}}}
{{#dplvar:set|pnc|{{#multireplace:{{#dplvar:pnc}}|/(.*)/=$1|.=,}}}}
{{#dplvar:set|pnc|{{#multireplace:{{#dplvar:pnc}}|/[!"$&*+-.:;<>?`~„…†‡‹‘’“”•–—›¡§¨«°±·º»¿×÷ʹʺ#%]/ui=,}}}}
{{#dplvar:set|pnc|{{#multireplace:{{#dplvar:pnc}}|/^([^([^&#133;]*)(&#133;)(.*)$/=$1$3|&=,}}}}
{{#ifexpr:{{#dpl:category=sheet music|category={{#dplvar:plc}}  compositions|distinct=false|mode=userformat|namespace=|resultsheader=%PAGES%|noresultsheader=0|allowcachedresults=false}}>0|
{{#dplvar:set|pnc|{{#multireplace:{{#dplvar:pnc}}|/^([^([^\…]
{{#dplvar:set|plcc|{{CompFromWorkTitle|{{#dplvar:pnc}}}}}}|{{#dplvar:set|plcc|zzzz}}}}
{{#ifeq:{{
</includeonly><noinclude>
</includeonly><noinclude>


{{Doc|1=
{{Doc|1=
THIS TEMPLATE calls template {{tl|MPList}}; the description below includes both.
This template is for use on a Music publication page, WHERE AT LEAST ONE WORK HAS MULTIPLE PUBLICATION CITATIONS. This template requires the use of the template {{tl|Pub}} on all work pages. If no works in a publication have multiple publication citations, please use Template {{tl|PubList}} instead (which uses {{tl|Published}} on work pages).
This template is for use on a Music publication page, WHERE AT LEAST ONE WORK HAS MULTIPLE PUBLICATION CITATIONS. This template requires the use of the template {{tl|Pub}} on all work pages. If no works in a publication have multiple publication citations, please use Template {{tl|PubList}} instead (which uses {{tl|Published}} on work pages).


Line 168: Line 191:
{{!}}subg{{!}}{{!}}Subgenre
{{!}}subg{{!}}{{!}}Subgenre
{{!}}-
{{!}}-
{{!}}yr{{!}}{{!}}Year of publication
{{!}}subg2{{!}}{{!}}Subgenre 2
{{!}}-
{{!}}yr{{!}}{{!}}Year of (earliest) publication
{{!}}-
{{!}}-
{{!}}lan{{!}}{{!}}Language
{{!}}lan{{!}}{{!}}Language
{{!}}-
{{!}}-
{{!}}first{{!}}{{!}}First Line
{{!}}first{{!}}{{!}}First Line
{{!}}-
{{!}}instr{{!}}{{!}}Instruments
{{!}}-
{{!}}-
{{!}}met{{!}}{{!}}Meter
{{!}}met{{!}}{{!}}Meter
Line 181: Line 208:
{{!}}-
{{!}}-
{{!}}}
{{!}}}
{{mdl|-4}}
{{mdl}}
{{{!}}class="wikitable" align="center"
{{{!}}class="wikitable" align="center"
!color=#ddffdd{{!}}Sample template calls
!color=#ddffdd{{!}}Sample template calls
Line 195: Line 222:
{{!}}-
{{!}}-
{{!}}}
{{!}}}
{{btm}}


Columns in the table depend on what the first code (<code1>) is:
Columns in the table depend on what the first code (<code1>) is:
Line 211: Line 237:


If the first code is something other than <tt>seq</tt> then the first column is the work title, in which case the table is sorted by work Title, using sort keys as specified in <tt><nowiki>{{DEFAULTSORT:{{NameSorter}}}}</nowiki></tt> on the work pages.
If the first code is something other than <tt>seq</tt> then the first column is the work title, in which case the table is sorted by work Title, using sort keys as specified in <tt><nowiki>{{DEFAULTSORT:{{NameSorter}}}}</nowiki></tt> on the work pages.
{{btm}}
Guidelines for title of a Music publication page can be found [https://www.cpdl.org/wiki/index.php/Help:Create_a_new_music_publication_page#Naming_a_new_music_publication_page here].


The second parameter is '''required'''; enter the year of publication.
The second parameter is '''required'''; enter the year of publication.
IF THERE ARE MULTIPLE BOOKS IN THE SAME PUBLICATION, such as Editions, Volumes, Parts, etc.: Please use the Template {{tl|Volumes}} – see the description of that template for more details. In that case, a command such as <tt><nowiki>{{MultiPubList|yr,com,lyr,gen,subg,vo}}</nowiki></tt> (notice no second parameter) will yield several tables, one for each book specified in the {{tl|Volumes}} command.
}}
}}
:(Version 15e – 2019-09-08)


[[Category:Templates]]
[[Category:Templates]]

Revision as of 02:41, 9 September 2019


Documentation

THIS TEMPLATE calls template {{MPList}}; the description below includes both.

This template is for use on a Music publication page, WHERE AT LEAST ONE WORK HAS MULTIPLE PUBLICATION CITATIONS. This template requires the use of the template {{Pub}} on all work pages. If no works in a publication have multiple publication citations, please use Template {{PubList}} instead (which uses {{Published}} on work pages).

This template produces a table listing all the works that have links to the publication within the template {{Pub}} on their work pages. This table will be automatically updated.

Syntax: {{MultiPubList|<code1>,<code2>,…,<coden>|YYYY}}

where <codei> is one of the codes below (comma-delimited, in any order), and YYYY is the year that the publication was first issued (shown on the publication page as the first parameter within template {{PubDatePlace}} (REQUIRED).
Code Output
seq Sequence no. in publication
pg Page number(s) in publication
com Composer
arr Arranger
lyr Lyricist
gen Genre
subg Subgenre
subg2 Subgenre 2
yr Year of (earliest) publication
lan Language
first First Line
instr Instruments
met Meter
vo Number of voices
voices Voices
Sample template calls Columns produced
{{MultiPubList|com,arr,gen,subg,vo,voices}} Title | Composer | Arranger | Genre | Subgenre | No. Voices | Voices
{{MultiPubList|seq,com,gen,subg,vo,voices}} Sequence | Title | Composer | Arrager | Genre | Sungrnere | No. Voices | Voices
{{MultiPubList|com,arr,subg,vo,met}} Title | Composer | Arranger | Subgenre | No. Voices | Meter
{{MultiPubList|first,gen,subg,arr,vo}} Title | First Line | Subgenre | Arranger | No. Voices

Columns in the table depend on what the first code (<code1>) is:

<code1> Columns (* = sorted column)
seq* No. ¦ Title ¦ <code2> ¦ <code3> ¦ …
(other) Title* ¦ <code1> ¦ <code2> ¦ …

If seq is is the first code (<code1>), sequence number appears as the first column in the table, and the table is sorted on sequence number. If no= is specified anything but an number, the table will not sort correctly; please use another first code.

If the first code is something other than seq then the first column is the work title, in which case the table is sorted by work Title, using sort keys as specified in {{DEFAULTSORT:{{NameSorter}}}} on the work pages.

Guidelines for title of a Music publication page can be found here.

The second parameter is required; enter the year of publication.

IF THERE ARE MULTIPLE BOOKS IN THE SAME PUBLICATION, such as Editions, Volumes, Parts, etc.: Please use the Template {{Volumes}} – see the description of that template for more details. In that case, a command such as {{MultiPubList|yr,com,lyr,gen,subg,vo}} (notice no second parameter) will yield several tables, one for each book specified in the {{Volumes}} command.

(Version 15e – 2019-09-08)