Template:Births and deaths TOC/doc

From English Wikipedia @ Freddythechick

This template is intended for use on the births and deaths sections of articles on specific years, e.g. 2014. Ideally, it should only be added at the end of the given year.

Usage

<syntaxhighlight lang="wikitext">

Content
1Expression error: Unexpected = operator.Expression error: Unexpected <= operator.Expression error: Unexpected <= operator.Expression error: Unexpected <= operator.Expression error: Unexpected <= operator.Expression error: Unexpected <= operator.Expression error: Unexpected <= operator.Expression error: Unexpected <= operator.Expression error: Unexpected <= operator.Expression error: Unexpected <= operator.Expression error: Unexpected < operator.

</syntaxhighlight>

Events/births/deaths

The events/births/deaths value of the first unnamed parameter shows the ToC's title as "Events", "Births" or "Deaths". events adds the number 2 to the section titles in the links while deaths adds the number 3. This is because "Births" and "Deaths" are usually the second and third sections respectively in year articles, and leaving month titles without these numbers would direct users to months in the "Events" section.

<syntaxhighlight lang="wikitext" inline>

Events
January · February · March · April · May · June · July · August · September · October · November · December

</syntaxhighlight>

Events
January · February · March · April · May · June · July · August · September · October · November · December

<syntaxhighlight lang="wikitext" inline>

Births
January · February · March · April · May · June · July · August · September · October · November · December

</syntaxhighlight>

Births
January · February · March · April · May · June · July · August · September · October · November · December

<syntaxhighlight lang="wikitext" inline>

Deaths
January · February · March · April · May · June · July · August · September · October · November · December

</syntaxhighlight>

Deaths
January · February · March · April · May · June · July · August · September · October · November · December

The parameter can also be empty. This makes the ToC title "Content" by default. Like with events, no number is added to the links.

<syntaxhighlight lang="wikitext" inline>

Content
January · February · March · April · May · June · July · August · September · October · November · December

</syntaxhighlight>

Content
January · February · March · April · May · June · July · August · September · October · November · December

|title= will override the default ToC title for any of events/births/deaths/(empty).

<syntaxhighlight lang="wikitext" inline>

Months
January · February · March · April · May · June · July · August · September · October · November · December

</syntaxhighlight>

Months
January · February · March · April · May · June · July · August · September · October · November · December


{{{months}}}

The |months= parameter specifies the number of months to show or the limit of months shown on the template. For example, |months=9 would only show the months of January to September. This can be used in the current year. Selected months can be omitted by using Custom titles for every month to include.

<syntaxhighlight lang="wikitext" inline>

Births
January · February · March · April · May · June · July · August · September

</syntaxhighlight>

Births
January · February · March · April · May · June · July · August · September

{{{unknown}}}

The |unknown= parameter adds a section called "Date unknown" to the list for people with unknown dates of birth included in the article.

<syntaxhighlight lang="wikitext" inline>

Deaths
January · February · March · April · May · June · July · August · September · October · November · December · Date unknown

</syntaxhighlight>

Deaths
January · February · March · April · May · June · July · August · September · October · November · December · Date unknown

Sections

In the event of a case where months have custom titles in either section, the |section= parameter can be used to specify the given number used in the months' titles.

<syntaxhighlight lang="wikitext" inline>

Deaths
January · February · March · April · May · June · July · August · September · October · November · December

</syntaxhighlight>

Deaths
January · February · March · April · May · June · July · August · September · October · November · December

Sometimes, a certain month section or a "Date unknown" section may have already been included more than twice or thrice. The individual |section[n]= and the |sectionu= (unknown section) parameters can be used to specify the given number used in these specific months' titles.

In the example below, August in the "Births" section would be the third such August section in the given year article, and the "Date unknown" section would be the second such section in the given year article.

<syntaxhighlight lang="wikitext" inline>

Births
January · February · March · April · May · June · July · August · September · October · November · December · Date unknown

</syntaxhighlight>

Births
January · February · March · April · May · June · July · August · September · October · November · December · Date unknown

Custom titles

The numbers 1–12 in the syntax above represent custom titles that can be inserted instead of January–December if the article contains custom month titles. No number can be added if custom titles are used.

<syntaxhighlight lang="wikitext" inline>

</syntaxhighlight>

Custom titles can also be used to select exactly which months to include but note that no number is added.

<syntaxhighlight lang="wikitext" inline>

Births
February · March · June · December

</syntaxhighlight>

Births
February · March · June · December

Full blank syntax

<syntaxhighlight lang="wikitext">

Content
[[# 1 1

]]Expression error: Unexpected = operator.Expression error: Unexpected <= operator.Expression error: Unexpected <= operator.Expression error: Unexpected <= operator.Expression error: Unexpected <= operator.Expression error: Unexpected <= operator.Expression error: Unexpected <= operator.Expression error: Unexpected <= operator.Expression error: Unexpected <= operator.Expression error: Unexpected <= operator.Expression error: Unexpected < operator.

</syntaxhighlight>