Template:MultiPubList: Difference between revisions
m (Added subg2 and instr as codes) |
No edit summary |
||
Line 4: | Line 4: | ||
{{#dplvar:set|pnc|{{#multireplace:{{#dplvar:pnc}}|/^([^([^…]*)(…)(.*)$/=$1$3|&=,}}}} | {{#dplvar:set|pnc|{{#multireplace:{{#dplvar:pnc}}|/^([^([^…]*)(…)(.*)$/=$1$3|&=,}}}} | ||
{{#dplvar:set|pnc|{{#multireplace:{{#dplvar:pnc}}|/^([^([^\…]*)\s(\…)(.*)$/=$1,$3}}}} | {{#dplvar:set|pnc|{{#multireplace:{{#dplvar:pnc}}|/^([^([^\…]*)\s(\…)(.*)$/=$1,$3}}}} | ||
{{#dplvar:set|pnc|{{#multireplace:{{#dplvar:pnc}}|/^(.*)$/=$1|-=,|:=,}}}} | {{#dplvar:set|pnc|{{#multireplace:{{#dplvar:pnc}}|/^(.*)$/=$1|-=,|:=,|;=,}}}} | ||
{{#if:{{{2|}}}|{{#dplvar:set|pnc|{{{2|}}} {{#dplvar:pnc}}}}}} | |||
{{#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 | {{#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|notcategory=Works with all editions withdrawn|mode=userformat|linksto={{PAGENAME}}|namespace=|include={{#ifeq:{{#explode:{{{1|}}}|,|0}}|seq|{Pub}:no:[[%PAGE%¦%TITLE%]] | ||
{{#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|subg2=,{Genre}:3|vo=,{Voicing}:1|voices=,{Voicing}:2|yr=,{Pub}:2|instr=,{Instruments}:1}} | {{#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|subg2=,{Genre}:3|vo=,{Voicing}:1|voices=,{Voicing}:2|yr=,{Pub}:2|instr=,{Instruments}:1}} | ||
|{{#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|subg2={Genre}:3|vo={Voicing}:1|voices={Voicing}:2|yr={Pub}:2|instr={Instruments}:1}} | |{{#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|subg2={Genre}:3|vo={Voicing}:1|voices={Voicing}:2|yr={Pub}:2|instr={Instruments}:1}} | ||
Line 19: | Line 20: | ||
{{#switch:{{#explode:{{{1|}}}|,|9}}|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|subg2=,{Genre}:3|vo=,{Voicing}:1|voices=,{Voicing}:2|yr=,{Pub}:2|instr=,{Instruments}:1}} | {{#switch:{{#explode:{{{1|}}}|,|9}}|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|subg2=,{Genre}:3|vo=,{Voicing}:1|voices=,{Voicing}:2|yr=,{Pub}:2|instr=,{Instruments}:1}} | ||
{{#switch:{{#explode:{{{1|}}}|,|10}}|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|subg2=,{Genre}:3|vo=,{Voicing}:1|voices=,{Voicing}:2|yr=,{Pub}:2|instr=,{Instruments}:1}} | {{#switch:{{#explode:{{{1|}}}|,|10}}|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|subg2=,{Genre}:3|vo=,{Voicing}:1|voices=,{Voicing}:2|yr=,{Pub}:2|instr=,{Instruments}:1}} | ||
|includematch={{#ifexpr:{{#rpos:{{TitleOnly|{{#dplvar:pnc}}}}|,}}<>-1|{{# | |||
|table=class="wikitable sortable" | |table=class="wikitable sortable" | ||
{{#ifeq:{{#explode:{{{1|}}}|,|0}}|seq|,-,No.,Title | {{#ifeq:{{#explode:{{{1|}}}|,|0}}|seq|,-,No.,Title | ||
Line 73: | Line 74: | ||
{{#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|subg2=,Subg. 2|vo=,Vo.|voices=,Voices|yr=,Year|instr=,Instruments}} | {{#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|subg2=,Subg. 2|vo=,Vo.|voices=,Voices|yr=,Year|instr=,Instruments}} | ||
|tablesortcol={{#ifeq:{{#explode:{{{1|}}}|,|0}}|seq|1|0}}|format=,\n[[%PAGE%|%TITLE%]]|replaceintitle=/ \([^\)]+\)$/, |noresultsheader=|suppresserrors=true}} | |tablesortcol={{#ifeq:{{#explode:{{{1|}}}|,|0}}|seq|1|0}}|format=,\n[[%PAGE%|%TITLE%]]|replaceintitle=/ \([^\)]+\)$/, |noresultsheader=|suppresserrors=true}} | ||
|{{#dpl:category=Sheet music | |{{#dpl:category=Sheet music|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:[[%PAGE%¦%TITLE%]] | ||
{{#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|subg2=,{Genre}:3|vo=,{Voicing}:1|voices=,{Voicing}:2|yr=,{Pub}:2|instr=,{Instruments}:1}} | {{#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|subg2=,{Genre}:3|vo=,{Voicing}:1|voices=,{Voicing}:2|yr=,{Pub}:2|instr=,{Instruments}:1}} | ||
Line 87: | Line 88: | ||
{{#switch:{{#explode:{{{1|}}}|,|9}}|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|subg2=,{Genre}:3|vo=,{Voicing}:1|voices=,{Voicing}:2|yr=,{Pub}:2|instr=,{Instruments}:1}} | {{#switch:{{#explode:{{{1|}}}|,|9}}|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|subg2=,{Genre}:3|vo=,{Voicing}:1|voices=,{Voicing}:2|yr=,{Pub}:2|instr=,{Instruments}:1}} | ||
{{#switch:{{#explode:{{{1|}}}|,|10}}|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|subg2=,{Genre}:3|vo=,{Voicing}:1|voices=,{Voicing}:2|yr=,{Pub}:2|instr=,{Instruments}:1}} | {{#switch:{{#explode:{{{1|}}}|,|10}}|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|subg2=,{Genre}:3|vo=,{Voicing}:1|voices=,{Voicing}:2|yr=,{Pub}:2|instr=,{Instruments}:1}} | ||
|includematch={{#ifexpr:{{#rpos:{{#dplvar:pnc}}|,}}<>-1|{{#ifeq:{{#explode | |||
|table=class="wikitable sortable" | |table=class="wikitable sortable" | ||
{{#ifeq:{{#explode:{{{1|}}}|,|0}}|seq|,-,No.,Title | {{#ifeq:{{#explode:{{{1|}}}|,|0}}|seq|,-,No.,Title | ||
Line 222: | Line 223: | ||
The second parameter is '''required'''; enter the year of publication. | The second parameter is '''required'''; enter the year of publication. | ||
:(Version 8a) | |||
}} | }} | ||
[[Category:Templates]] | [[Category:Templates]] |
Revision as of 02:04, 7 May 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:
|
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.
- (Version 8a)