Template:MultiPubList: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
No edit summary
(Additions to documentation only)
(37 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>
<noinclude>{{prot-temp}}</noinclude><includeonly>
{{#ifeq:{{#pos:{{PAGENAME}}|#39;}}||{{#dplvar:set|pnc|{{PAGENAME}}}}|{{#dplvar:set|pnc|{{#multireplace:{{PAGENAME}}|/^([^#39;]*)(#39;)(.*)$/=$1$3|&=,}}}}}}
{{#dplvar:set|plc|{{CompFromWorkTitle|{{PAGENAME}}}}}}
{{#dplvar:set|pnc|{{#multireplace:{{#dplvar:pnc}}|/(.*)/=$1|.=,}}}}
{{#ifeq:{{#pos:{{PAGENAME}}|#39;}}||{{#dplvar:set|pnc|{{PAGENAME}}}}|{{
 
</includeonly><noinclude>
</includeonly><noinclude>
{{Doc|1=
THIS TEMPLATE calls template {{tl|MPList}}; the description below includes both.


{{Doc|1=
This template is for use on a <u>Music publication</u> page. This template requires the use of the template {{tl|Pub}} on '''all''' work pages belonging to this publication.
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 produces a table listing all the works '''that have links''' to the publication within the template '''{{tl|Pub}}''' on their work pages. This table will be automatically updated.
This template produces a table listing all the works '''that have links''' to the publication within the template '''{{tl|Pub}}''' on their work pages. This table will be automatically updated, so users do not have to manually add works.


Syntax: '''<tt><nowiki>{{MultiPubList|<code1>,<code2>,…,<coden>|YYYY}}</nowiki></tt>'''  
Syntax: '''<tt><nowiki>{{MultiPubList|<code1>,<code2>,…,<coden>|YYYY}}</nowiki></tt>'''  
Line 172: Line 113:
{{!}}subg2{{!}}{{!}}Subgenre 2
{{!}}subg2{{!}}{{!}}Subgenre 2
{{!}}-
{{!}}-
{{!}}yr{{!}}{{!}}Year of publication
{{!}}yr{{!}}{{!}}Year of (earliest) publication
{{!}}-
{{!}}-
{{!}}lan{{!}}{{!}}Language
{{!}}lan{{!}}{{!}}Language
Line 187: Line 128:
{{!}}-
{{!}}-
{{!}}}
{{!}}}
{{mdl|-4}}
{{mdl}}
{{{!}}class="wikitable" align="center"
{{{!}}class="wikitable" align="center"
!color=#ddffdd{{!}}Sample template calls
!color=#ddffdd{{!}}Sample template calls
Line 194: Line 135:
{{!}}<nowiki>{{MultiPubList|com,arr,gen,subg,vo,voices}}</nowiki>{{!}}{{!}}<nowiki>Title | Composer | Arranger | Genre | Subgenre | No. Voices | Voices</nowiki>
{{!}}<nowiki>{{MultiPubList|com,arr,gen,subg,vo,voices}}</nowiki>{{!}}{{!}}<nowiki>Title | Composer | Arranger | Genre | Subgenre | No. Voices | Voices</nowiki>
{{!}}-
{{!}}-
{{!}}<nowiki>{{MultiPubList|seq,com,gen,subg,vo,voices}}</nowiki>{{!}}{{!}}<nowiki>Sequence | Title | Composer | Arrager | Genre | Sungrnere | No. Voices | Voices</nowiki>
{{!}}<nowiki>{{MultiPubList|seq,com,gen,subg,vo,voices}}</nowiki>{{!}}{{!}}<nowiki>Sequence | Title | Composer | Arranger | Genre | Sungrnere | No. Voices | Voices</nowiki>
{{!}}-
{{!}}-
{{!}}<nowiki>{{MultiPubList|com,arr,subg,vo,met}}</nowiki>{{!}}{{!}}<nowiki>Title | Composer | Arranger | Subgenre | No. Voices | Meter</nowiki>
{{!}}<nowiki>{{MultiPubList|com,arr,subg,vo,met}}</nowiki>{{!}}{{!}}<nowiki>Title | Composer | Arranger | Subgenre | No. Voices | Meter</nowiki>
Line 201: Line 142:
{{!}}-
{{!}}-
{{!}}}
{{!}}}
{{btm}}


{{top}}
Columns in the table depend on what the first code (<code1>) is:
Columns in the table depend on what the first code (<code1>) is:
{{{!}}class="wikitable" align="center"
{{{!}}class="wikitable" align="center"
Line 214: Line 153:
{{!}}-
{{!}}-
{{!}}}
{{!}}}
{{mdl}}
{{btm}}
If <tt>seq</tt> 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.
'''Sorting.''' If <tt>seq</tt> is is the first code (<code1>), sequence number appears as the first column in the table, and the table is sorted (numerically) on sequence number. If <tt>no=</tt> is specified on work pages as anything but an number, the table will sort <u>alphabetically</u> by sequence; please use another system for expressing sequence. Sequence systems that sort correctly:
{{top}}
* 1, 2, 3, 4, 5, 6, 7, 8, 9.01, 9.02, 9.03, 9.04, 9.05, 9.06, 9.07, 9.08, 9.09, 9.10, 10, 11 – Decimal numbers have always the same number of decimal digits
* A01, A02, A03, B10, B11, B12, B13 – all values have the same number of characters
 
On the other hand, the following sequence systems will <u>not</u> sort correctly:
* 1, 2, 3, 4, 5, 6-7, 8, 9-10, 11, 12, 13, 14 – will sort 1, 11, 12, 13, 14, 2, 3, 4, 5, 6-7, 8, 9-10 – alphabetically
* A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A20 – will sort A1, A10, A11, A12, A13, A14, A2, A20, A3, A4, A5, A6, A7, A8, A9
 
Please do not click the sort arrows for the sequence column; this will cause the column to sort alphabetically (1,10,100,101,102,11,12,13,14,15,16,17,18,19,2,20,21,…); refresh the page to get the native sort back. 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.
IF <tt>seq</tt> IS SPECIFIED IN THE <tt>MultiPubList</tt> CALL, THEN THE PARAMETER <tt>no=</tt> MUST BE SPECIFIED ON <u>EVERY</u> WORK PAGE. If the sequence number is not known, use <tt>no=0</tt> or <tt>no=00</tt>. The same is true of the <tt>yr</tt> and <tt>pg</tt> parameters.
{{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].
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. This must be a four-digit year. Pad years before 1000 with zeroes, as "0870" or "0033". If the code <tt>yr</tt> is used in the MultiPubList template, then the second parameter of the {{tl|Pub|1}} template <u>must</u> have a four-digit value on all work pages belonging to the publications.


:(Version 8a)
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 17b – 2020-11-22)


 
[[Category:DPL templates]]
[[Category:Templates]]
[[Category:Templates]]

Revision as of 14:42, 9 February 2022

Documentation

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

This template is for use on a Music publication page. This template requires the use of the template {{Pub}} on all work pages belonging to this publication.

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, so users do not have to manually add works.

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 | Arranger | 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> ¦ …

Sorting. If seq is is the first code (<code1>), sequence number appears as the first column in the table, and the table is sorted (numerically) on sequence number. If no= is specified on work pages as anything but an number, the table will sort alphabetically by sequence; please use another system for expressing sequence. Sequence systems that sort correctly:

  • 1, 2, 3, 4, 5, 6, 7, 8, 9.01, 9.02, 9.03, 9.04, 9.05, 9.06, 9.07, 9.08, 9.09, 9.10, 10, 11 – Decimal numbers have always the same number of decimal digits
  • A01, A02, A03, B10, B11, B12, B13 – all values have the same number of characters

On the other hand, the following sequence systems will not sort correctly:

  • 1, 2, 3, 4, 5, 6-7, 8, 9-10, 11, 12, 13, 14 – will sort 1, 11, 12, 13, 14, 2, 3, 4, 5, 6-7, 8, 9-10 – alphabetically
  • A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A20 – will sort A1, A10, A11, A12, A13, A14, A2, A20, A3, A4, A5, A6, A7, A8, A9

Please do not click the sort arrows for the sequence column; this will cause the column to sort alphabetically (1,10,100,101,102,11,12,13,14,15,16,17,18,19,2,20,21,…); refresh the page to get the native sort back. 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.

IF seq IS SPECIFIED IN THE MultiPubList CALL, THEN THE PARAMETER no= MUST BE SPECIFIED ON EVERY WORK PAGE. If the sequence number is not known, use no=0 or no=00. The same is true of the yr and pg parameters.

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

The second parameter is required; enter the year of publication. This must be a four-digit year. Pad years before 1000 with zeroes, as "0870" or "0033". If the code yr is used in the MultiPubList template, then the second parameter of the {{Pub|1}} template must have a four-digit value on all work pages belonging to the publications.

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 17b – 2020-11-22)