Template:PubDatePlace: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(Created page with "<includeonly>'''Publication date and place:''' {{#multireplace: {{{1|}}} | /(\d\d\d\d)/i={{Cat|$1 publications|$1}} }}{{{2|}}}<!-- -->{{#if: {{{3|}}}|{{#multireplace...")
 
No edit summary
Line 3: Line 3:
-->{{#if: {{{5|}}}|{{#multireplace:&#32; {{{5|}}} &#32;| /(\d\d\d\d)/i={{Cat|$1 works|$1}} }}{{{6|}}}}}</includeonly><noinclude><!--
-->{{#if: {{{5|}}}|{{#multireplace:&#32; {{{5|}}} &#32;| /(\d\d\d\d)/i={{Cat|$1 works|$1}} }}{{{6|}}}}}</includeonly><noinclude><!--
-->{{Doc|1=
-->{{Doc|1=
This template is for use on <b>Music publication</b> pages; for <b>Work</b> pages, use the Template "Published".
This template scans the text supplied at the '''PubDatePlace''' line for any four-digit year, and converts it into a link to  "category:YYYY publication". The page is simultaneously included in that category. Therefore, works that have a publication date are categorized accordingly.
This template scans the text supplied at the '''PubDatePlace''' line for any four-digit year, and converts it into a link to  "category:YYYY publication". The page is simultaneously included in that category. Therefore, works that have a publication date are categorized accordingly.



Revision as of 21:16, 24 November 2018

Documentation

This template is for use on Music publication pages; for Work pages, use the Template "Published".

This template scans the text supplied at the PubDatePlace line for any four-digit year, and converts it into a link to "category:YYYY publication". The page is simultaneously included in that category. Therefore, works that have a publication date are categorized accordingly.

The template accepts up to six parameters, but only the odd-numbered parameters are scanned for year numbers. Even-numbered parameters are displayed as plain text. Sometimes, there are year numbers in the text that should not be converted into a category link. For these cases, break the text in smaller parts, so that these numbers will fall in a even-numbered parameter.

Syntax:

{{PubDatePlace|<text (scanned)>|<text (displayed as-is)>|<text (scanned)>|<text (displayed as-is)>|<text (scanned)>|<text (displayed as-is)>}}