Changes

MyWikiBiz, Author Your Legacy — Tuesday May 14, 2024
Jump to navigationJump to search
Pywikibot 6.4.0
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
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:

<code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|templateEveryYearToPresent|''Start year''|''Template to transclude''}}</code>

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:

<code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|templateEveryYearToPresent|''Template to transclude''}}</code>

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 {{para|templatedonotconsume}}. These parameters will be ignored by the module.

<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->

}}</includeonly>

Navigation menu