Module:Years generator/doc

MyWikiBiz, Author Your Legacy — Thursday November 28, 2024
< Module:Years generator
Revision as of 08:02, 16 July 2021 by Zoran (talk | contribs) (Pywikibot 6.4.0)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This is the documentation page for Module:Years generator

This module can be used to transclude a particular template for each year since a given year. It will produce a bolded year, followed by an Em dash, followed by your template, for each year from the year you specify (inclusive) up to the current year (inclusive).

Direct usage

Copy and paste the following code, substituting "start year" for the year you want to start the iteration from, and "template to transclude" with the template you want:

{{#invoke:Years generator|templateEveryYearToPresent|Start year|Template to transclude}}

This will result in the template being called for each year from Start year to the current year, with the year it's being called for as the first and only argument.

Usage in a template

Copy and paste the following code, substituting "template to transclude" with the template you want:

{{#invoke:Years generator|templateEveryYearToPresent|Template to transclude}}

The parameters that your template's users put after your template will be automatically consumed by this module, and passed on to the template that you are transcluding for each year. If you wish to consume some parameters yourself, add them to a comma-separated list in a parameter Template:Para. These parameters will be ignored by the module.