Template:MultiPubList: Difference between revisions
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
{{#dplvar:set|pnc|{{#multireplace:{{#dplvar:pnc}}|/^([^([^\…]*)\s(\…)(.*)$/=$1,$3}}}} | {{#dplvar:set|pnc|{{#multireplace:{{#dplvar:pnc}}|/^([^([^\…]*)\s(\…)(.*)$/=$1,$3}}}} | ||
{{#ifexpr:{{#dpl:category=sheet music|category={{CompFromWorkTitle|{{#dplvar:pnc}}}} compositions|distinct=false|mode=userformat|namespace=|resultsheader=%PAGES%|noresultsheader=0|allowcachedresults=false}}>0|{{#dplvar:set|plcc|{{CompFromWorkTitle|{{#dplvar:pnc}}}}}}|{{#dplvar:set|plcc|zzzz}}|{{#dplvar:set|plcc|zzzz}}}} | {{#ifexpr:{{#dpl:category=sheet music|category={{CompFromWorkTitle|{{#dplvar:pnc}}}} compositions|distinct=false|mode=userformat|namespace=|resultsheader=%PAGES%|noresultsheader=0|allowcachedresults=false}}>0|{{#dplvar:set|plcc|{{CompFromWorkTitle|{{#dplvar:pnc}}}}}}|{{#dplvar:set|plcc|zzzz}}|{{#dplvar:set|plcc|zzzz}}}} | ||
{{#ifexpr:{{#dpl:category=sheet music|distinct=false|mode=userformat|namespace=|linksto={{PAGENAME}}|resultsheader=%PAGES%|titlematch=%{{#dplvar:plcc}}%|noresultsheader=0|allowcachedresults=false}}={{#dpl:category=sheet music|distinct=false|mode=userformat|namespace=|linksto={{PAGENAME}}|resultsheader=%PAGES%|noresultsheader=0|allowcachedresults=false}}|{{#dpl:category=Sheet music|category={{#if:{{{2|}}}|{{{2|}}} works|'''ERROR. PARAMETER 2 MUST BE THE FOUR-DIGIT YEAR OF PUBLICATION.'''}}|notcategory=Works with all editions withdrawn|mode=userformat|linksto={{PAGENAME}}|namespace=|include= | {{#ifexpr:{{#dpl:category=sheet music|distinct=false|mode=userformat|namespace=|linksto={{PAGENAME}}|resultsheader=%PAGES%|titlematch=%{{#dplvar:plcc}}%|noresultsheader=0|allowcachedresults=false}}={{#dpl:category=sheet music|distinct=false|mode=userformat|namespace=|linksto={{PAGENAME}}|resultsheader=%PAGES%|noresultsheader=0|allowcachedresults=false}}|{{#dpl:category=Sheet music|category={{#if:{{{2|}}}|{{{2|}}} works|'''ERROR. PARAMETER 2 MUST BE THE FOUR-DIGIT YEAR OF PUBLICATION.'''}}|notcategory=Works with all editions withdrawn|mode=userformat|linksto={{PAGENAME}}|namespace=|include={{#ifeq:{{#explode:{{{1|}}}|,|0}}|seq|{Pub}:no:[[%PAGE%¦%TITLE%]] | ||
{{#ifeq:{{#explode:{{{1|}}}|,|0}}|seq|{Pub}:no | {{#switch:{{#explode:{{{1|}}}|,|1}}|pg=,{Pub}:pg|com=,{Composer}:1|arr=,{Arranger}:1|first=,{FirstLine}:1|gen=,{Genre}:1|lan=,{Language}:1|lyr=,{Lyricist}:1|met=,{Meter}:1|subg=,{Genre}:2|vo=,{Voicing}:1|voices=,{Voicing}:2|yr=,{Pub}:2}} | ||
{{#switch:{{#explode:{{{1|}}}|,|1}}|pg=,{Pub} | |||
|{{#switch:{{#explode:{{{1|}}}|,|0}}|pg={Pub}:pg|com={Composer}:1|arr={Arranger}:1|first={FirstLine}:1|gen={Genre}:1|lan={Language}:1|lyr={Lyricist}:1|met={Meter}:1|subg={Genre}:2|vo={Voicing}:1|voices={Voicing}:2|yr={Pub}:2}} | |{{#switch:{{#explode:{{{1|}}}|,|0}}|pg={Pub}:pg|com={Composer}:1|arr={Arranger}:1|first={FirstLine}:1|gen={Genre}:1|lan={Language}:1|lyr={Lyricist}:1|met={Meter}:1|subg={Genre}:2|vo={Voicing}:1|voices={Voicing}:2|yr={Pub}:2}} | ||
{{#switch:{{#explode:{{{1|}}}|,|1}}|seq=,{Pub}:no|pg=,{Pub}:pg|com=,{Composer}:1|arr=,{Arranger}:1|first=,{FirstLine}:1|gen=,{Genre}:1|lan=,{Language}:1|lyr=,{Lyricist}:1|met=,{Meter}:1|subg=,{Genre}:2|vo=,{Voicing}:1|voices=,{Voicing}:2|yr=,{Pub}:2}}}} | {{#switch:{{#explode:{{{1|}}}|,|1}}|seq=,{Pub}:no|pg=,{Pub}:pg|com=,{Composer}:1|arr=,{Arranger}:1|first=,{FirstLine}:1|gen=,{Genre}:1|lan=,{Language}:1|lyr=,{Lyricist}:1|met=,{Meter}:1|subg=,{Genre}:2|vo=,{Voicing}:1|voices=,{Voicing}:2|yr=,{Pub}:2}}}} | ||
Line 62: | Line 61: | ||
{{#switch:{{#explode:{{{1|}}}|,|1}}|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | {{#switch:{{#explode:{{{1|}}}|,|1}}|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | ||
|,Title{{#switch:{{#explode:{{{1|}}}|,|0}}|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | |,Title{{#switch:{{#explode:{{{1|}}}|,|0}}|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | ||
{{#switch:{{#explode:{{{1|}}}|,|1}}|seq=, | {{#switch:{{#explode:{{{1|}}}|,|1}}|seq=,No.|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}}}} | ||
{{#switch:{{#explode:{{{1|}}}|,|2}}|seq=, | {{#switch:{{#explode:{{{1|}}}|,|2}}|seq=,No.|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | ||
{{#switch:{{#explode:{{{1|}}}|,|3}}|seq=, | {{#switch:{{#explode:{{{1|}}}|,|3}}|seq=,No.|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | ||
{{#switch:{{#explode:{{{1|}}}|,|4}}|seq=, | {{#switch:{{#explode:{{{1|}}}|,|4}}|seq=,No.|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | ||
{{#switch:{{#explode:{{{1|}}}|,|5}}|seq=, | {{#switch:{{#explode:{{{1|}}}|,|5}}|seq=,No.|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | ||
{{#switch:{{#explode:{{{1|}}}|,|6}}|seq=, | {{#switch:{{#explode:{{{1|}}}|,|6}}|seq=,No.|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | ||
{{#switch:{{#explode:{{{1|}}}|,|7}}|seq=, | {{#switch:{{#explode:{{{1|}}}|,|7}}|seq=,No.|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | ||
{{#switch:{{#explode:{{{1|}}}|,|8}}|seq=, | {{#switch:{{#explode:{{{1|}}}|,|8}}|seq=,No.|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | ||
{{#switch:{{#explode:{{{1|}}}|,|9}}|seq=, | {{#switch:{{#explode:{{{1|}}}|,|9}}|seq=,No.|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | ||
{{#switch:{{#explode:{{{1|}}}|,|10}}|seq=, | {{#switch:{{#explode:{{{1|}}}|,|10}}|seq=,No.|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | ||
| | |tablesortcol={{#ifeq:{{#explode:{{{1|}}}|,|0}}|seq|1|0}}|format=,\n[[%PAGE%|%TITLE%]]|replaceintitle=/ \([^\)]+\)$/, |noresultsheader=|suppresserrors=true}} | ||
|{{#dpl:category=Sheet music|category={{#if:{{{2|}}}|{{{2|}}} works|'''ERROR. PARAMETER 2 MUST BE THE FOUR-DIGIT YEAR OF PUBLICATION.'''}}|notcategory=Works with all editions withdrawn|mode=userformat|linksto={{PAGENAME}}|namespace=|include= | |{{#dpl:category=Sheet music|category={{#if:{{{2|}}}|{{{2|}}} works|'''ERROR. PARAMETER 2 MUST BE THE FOUR-DIGIT YEAR OF PUBLICATION.'''}}|notcategory=Works with all editions withdrawn|mode=userformat|linksto={{PAGENAME}}|namespace=|include= | ||
{{#ifeq:{{#explode:{{{1|}}}|,|0}}|seq|{Pub}:no | {{#ifeq:{{#explode:{{{1|}}}|,|0}}|seq|{Pub}:no:[[%PAGE%¦%TITLE%]] | ||
{{#switch:{{#explode:{{{1|}}}|,|1}}|pg=,{Pub} | {{#switch:{{#explode:{{{1|}}}|,|1}}|pg=,{Pub}:pg|com=,{Composer}:1|arr=,{Arranger}:1|first=,{FirstLine}:1|gen=,{Genre}:1|lan=,{Language}:1|lyr=,{Lyricist}:1|met=,{Meter}:1|subg=,{Genre}:2|vo=,{Voicing}:1|voices=,{Voicing}:2|yr=,{Pub}:2}} | ||
|{{#switch:{{#explode:{{{1|}}}|,|0}}|pg={Pub}:pg|com={Composer}:1|arr={Arranger}:1|first={FirstLine}:1|gen={Genre}:1|lan={Language}:1|lyr={Lyricist}:1|met={Meter}:1|subg={Genre}:2|vo={Voicing}:1|voices={Voicing}:2|yr={Pub}:2}} | |{{#switch:{{#explode:{{{1|}}}|,|0}}|pg={Pub}:pg|com={Composer}:1|arr={Arranger}:1|first={FirstLine}:1|gen={Genre}:1|lan={Language}:1|lyr={Lyricist}:1|met={Meter}:1|subg={Genre}:2|vo={Voicing}:1|voices={Voicing}:2|yr={Pub}:2}} | ||
{{#switch:{{#explode:{{{1|}}}|,|1}}|seq=,{Pub}:no|pg=,{Pub}:pg|com=,{Composer}:1|arr=,{Arranger}:1|first=,{FirstLine}:1|gen=,{Genre}:1|lan=,{Language}:1|lyr=,{Lyricist}:1|met=,{Meter}:1|subg=,{Genre}:2|vo=,{Voicing}:1|voices=,{Voicing}:2|yr=,{Pub}:2}}}} | {{#switch:{{#explode:{{{1|}}}|,|1}}|seq=,{Pub}:no|pg=,{Pub}:pg|com=,{Composer}:1|arr=,{Arranger}:1|first=,{FirstLine}:1|gen=,{Genre}:1|lan=,{Language}:1|lyr=,{Lyricist}:1|met=,{Meter}:1|subg=,{Genre}:2|vo=,{Voicing}:1|voices=,{Voicing}:2|yr=,{Pub}:2}}}} | ||
Line 143: | Line 129: | ||
{{#switch:{{#explode:{{{1|}}}|,|1}}|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | {{#switch:{{#explode:{{{1|}}}|,|1}}|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | ||
|,Title{{#switch:{{#explode:{{{1|}}}|,|0}}|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | |,Title{{#switch:{{#explode:{{{1|}}}|,|0}}|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | ||
{{#switch:{{#explode:{{{1|}}}|,|1}}|seq=, | {{#switch:{{#explode:{{{1|}}}|,|1}}|seq=,No.|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}}}} | ||
{{#switch:{{#explode:{{{1|}}}|,|2}}|seq=, | {{#switch:{{#explode:{{{1|}}}|,|2}}|seq=,No.|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | ||
{{#switch:{{#explode:{{{1|}}}|,|3}}|seq=, | {{#switch:{{#explode:{{{1|}}}|,|3}}|seq=,No.|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | ||
{{#switch:{{#explode:{{{1|}}}|,|4}}|seq=, | {{#switch:{{#explode:{{{1|}}}|,|4}}|seq=,No.|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | ||
{{#switch:{{#explode:{{{1|}}}|,|5}}|seq=, | {{#switch:{{#explode:{{{1|}}}|,|5}}|seq=,No.|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | ||
{{#switch:{{#explode:{{{1|}}}|,|6}}|seq=, | {{#switch:{{#explode:{{{1|}}}|,|6}}|seq=,No.|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | ||
{{#switch:{{#explode:{{{1|}}}|,|7}}|seq=, | {{#switch:{{#explode:{{{1|}}}|,|7}}|seq=,No.|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | ||
{{#switch:{{#explode:{{{1|}}}|,|8}}|seq=, | {{#switch:{{#explode:{{{1|}}}|,|8}}|seq=,No.|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | ||
{{#switch:{{#explode:{{{1|}}}|,|9}}|seq=, | {{#switch:{{#explode:{{{1|}}}|,|9}}|seq=,No.|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | ||
{{#switch:{{#explode:{{{1|}}}|,|10}}|seq=, | {{#switch:{{#explode:{{{1|}}}|,|10}}|seq=,No.|pg=,Page|com=,Composer|arr=,Arranger|first=,First Line|gen=,Genre|lan=,Language|lyr=,Lyricist|met=,Meter|subg=,Subgenre|vo=,Vo.|voices=,Voices|yr=,Year}} | ||
| | |tablesortcol={{#ifeq:{{#explode:{{{1|}}}|,|0}}|seq|1|0}}|format=,\n[[%PAGE%|%TITLE%]]|replaceintitle=/ \([^\)]+\)$/, |noresultsheader=|suppresserrors=true}}}} | ||
</includeonly><noinclude> | </includeonly><noinclude> | ||
Line 229: | Line 202: | ||
!color=#ddffdd{{!}}Columns (* = sorted column) | !color=#ddffdd{{!}}Columns (* = sorted column) | ||
{{!}}- | {{!}}- | ||
{{!}}seq{{!}}{{!}} No. ¦ Title | {{!}}seq*{{!}}{{!}} No. ¦ Title ¦ <code2> ¦ <code3> ¦ … | ||
{{!}}- | {{!}}- | ||
{{!}}(other){{!}}{{!}} Title* ¦ <code1> ¦ <code2> ¦ … | {{!}}(other){{!}}{{!}} Title* ¦ <code1> ¦ <code2> ¦ … | ||
Line 235: | Line 208: | ||
{{!}}} | {{!}}} | ||
If <tt>seq</tt> is is the first code (<code1>), sequence number appears as the first column in the table. If the first code is something other than <tt>seq</tt> then the first column is the work title | 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 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. | ||
The second parameter is '''required'''; enter the year of publication. | The second parameter is '''required'''; enter the year of publication. |
Revision as of 23:07, 8 April 2019
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).
|
|
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 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.
The second parameter is required; enter the year of publication.