Template:Year dpl/doc: Difference between revisions

From RuneRealm Wiki
Jump to navigation Jump to search
Content added Content deleted
No edit summary
Tag: Reverted
No edit summary
Tag: Manual revert
 
Line 1: Line 1:
{{documentation|Template:Year dpl}}
{{documentation|Template:Year dpl}}
This template generates 'year' mw.pages, such as [[2015]], using DPL.
This template generates 'year' pages, such as [[2015]], using DPL.


==Usage==
==Usage==

Latest revision as of 12:07, 17 October 2024

This is a documentation subpage for Template:Year dpl.
It contains usage information, categories, and other content that is not part of the original template page.
Template:Year dpl invokes function year in Module:Update using Lua.

This template generates 'year' pages, such as 2015, using DPL.

Usage

{{Year dpl}}

This template will attempt to use the PAGENAME as the year to find. There is currently no way to override this.

Structure

The DPL calls function as follows:

  1. Year dpl initiates, gathering all categories of Category:Updates by month, and passing each in turn to Year dpl/count
  2. Year dpl/count finds an intersection between the year category (e.g. Category:2015 updates) and the sub-categories of the month category passed in (e.g. subcategories of Category:November updates, like Category:30 November updates). If it finds some results, then this year-month combination has some updates, so it returns 1, else it returns 0. This allows automation of an entire year before it is done, without showing empty sections.
  3. If Year dpl/count found results, Year dpl then passes the month to Year dpl/month
  4. Year dpl/month generates the heading, then passes each day of the month into Year dpl/day
  5. Year dpl/day prints a first-level bullet of the date and follows it with second-level bullets of each update that occurred that day. If no updates occurred that day, it prints nothing.