Difference between revisions of "Template:Births and deaths by year for decade"

From blackwiki
Jump to navigation Jump to search
imported>Pppery
(oops)
imported>Certes
(Show the correct donor article for AD 911 etc. per Template talk:Transclude births)
Line 2: Line 2:
 
|<nowiki>== {{ucfirst:{{{1}}}}} ==
 
|<nowiki>== {{ucfirst:{{{1}}}}} ==
 
{{preprocess|{{((}}transcluding articles
 
{{preprocess|{{((}}transcluding articles
   {{!}} {{#ifeq:{{{year}}}|0|{{void|There is no AD year 0}}|{{dr|y|y|{{{year}}}0|0|n{{#ifexpr:{{{year}}}<=10|a}}}}}}
+
   {{!}} {{#ifeq:{{{decade}}}|0|{{void|There is no AD year 0}}|{{Year article|{{{decade}}}0}}}}
   {{!}} {{for loop|{{!}}|call=dr|pc1n=1|pc1v=y|pc2n=2|pc2v=y|pc3n=3|pc3v={{{year}}}0|pc4n=5|pc4v={{#ifexpr:{{{year}}}<10|na|n}}|pv=4|1|2|3|4|5|6|7|8|9}}
+
   {{!}} {{for loop|{{!}}|call=Year article|pc1n=1|pc1v={{{decade}}}0|pv=2|1|2|3|4|5|6|7|8|9}}
 
{{))}}}}
 
{{))}}}}
{{#ifeq:{{{year}}}|0|{{void|There is no AD year 0}}|
+
{{#ifeq:{{{decade}}}|0|{{void|There is no AD year 0}}|
{{Transclude {{{1}}}|{{{year}}}0}}
+
{{Transclude {{{1}}}|{{{decade}}}0}}
 
}}
 
}}
 
{{for loop|
 
{{for loop|
|call=Transclude {{{1}}}|{{{year}}}1|{{{year}}}2|{{{year}}}3|{{{year}}}4|{{{year}}}5|{{{year}}}6|{{{year}}}7|{{{year}}}8|{{{year}}}9}}
+
|call=Transclude {{{1}}}|{{{decade}}}1|{{{decade}}}2|{{{decade}}}3|{{{decade}}}4|{{{decade}}}5|{{{decade}}}6|{{{decade}}}7|{{{decade}}}8|{{{decade}}}9}}
</nowiki>|births|deaths|year={{{1|0}}}}}
+
</nowiki>|births|deaths|decade={{{1|0}}}}}
 
<noinclude>
 
<noinclude>
 
{{documentation |content=
 
{{documentation |content=
Line 18: Line 18:
 
Negative years use the BC suffix, years 1–100 use the AD prefix, and years above 100 use the plain year number.
 
Negative years use the BC suffix, years 1–100 use the AD prefix, and years above 100 use the plain year number.
 
== Example: the 70s AD ==
 
== Example: the 70s AD ==
{{Births and deaths by year for decade|7}}
+
{{{{PAGENAME}}|7}}
 +
== Example: the 910s AD ==
 +
{{{{PAGENAME}}|91}}
 
{{template reference list}}
 
{{template reference list}}
 
{{notelist}}
 
{{notelist}}
 
}}</noinclude>
 
}}</noinclude>

Revision as of 18:11, 23 September 2019

Births

Template:Preprocess

Lua error: expandTemplate: template "Transclude births" does not exist.

Deaths

Template:Preprocess

Lua error: expandTemplate: template "Transclude deaths" does not exist.


Template documentation

Usage

Invoked with a decade as single argument, for example {{Transclude deaths|82}} for the 820s, the template compiles the list of births and deaths from each year article of the decade, by transcluding their "Births" and "Deaths" sections. Empty or non-existent sections are not transcluded. Year numbers are prepended to the transcluded contents with bold pseudo-headers, in order to avoid overloading the transcluding page's table of contents.

Negative years use the BC suffix, years 1–100 use the AD prefix, and years above 100 use the plain year number.

Example: the 70s AD

Births

Template:Preprocess Template:Transclude births Lua error: expandTemplate: template "Transclude births" does not exist.

Deaths

Template:Preprocess Template:Transclude deaths Lua error: expandTemplate: template "Transclude deaths" does not exist.


Example: the 910s AD

Births

Template:Preprocess Template:Transclude births Lua error: expandTemplate: template "Transclude births" does not exist.

Deaths

Template:Preprocess Template:Transclude deaths Lua error: expandTemplate: template "Transclude deaths" does not exist.


References