Документация Документация
create use count

Help

This template generates a DPL for a specific date, and, when used on a project page, categorizes the project page. It is used primarily on project pages whose names have either form Уикиновини:year/month/day or Уикиновини:year/month, where month is the name of the month, and day is an integer with no leading zero. For example, [Уикиновини:2019/Септември/1]].

The DPL shows stable pages only, so be wary if using this template for a date from before the adoption of flaggedrevs review.

Usage

Call this template with the following three parameters.

  • The first unnamed parameter specifies the day of the month, so should be an integer with no leading zero.
  • The second unnamed parameter specifies the name of the month.
  • The third unnamed parameter specifies the year.

Technically the parameters are optional, and if omitted and the transcluding page is a project page as described above, the template extracts the omitted information from the name of the transcluding page. So {{DateDPL}} on any page would produce the same DPL as {{DateDPL}} on page 2019/Септември/1. However, those project pages are meant to provide their DPL when transcluded elsewhere, and this will not work right if the project page does not provide parameters to this template.

The following markup, used on a project DPL page for a day, fixes the appropriate parameter values:

{{DateDPL|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}|{{subst:#titleparts:{{subst:PAGENAME}}|1|2}}|{{subst:#titleparts:{{subst:PAGENAME}}|1|1}}}}

For example, this markup on page 2019/Септември would expand to {{DateDPL|1|January|2012}}.

Internals

This template categorizes the transcluding page only if the transcluding page is in project space (Wikinews:). Categorization, if done, depends on the name of the transcluding page regardless of any parameters. Historically, pages were put in day or month categories, but this later became inconvenient because the month and day categories would then contain project pages that weren't articles. At this writing, pages go in Category:Date DPL pages and, if the first parameter isn't non-blank, Category:Date DPL pages missing parameters.