Module:Labelled list hatnote/doc explained

This module provides a handful of functions that make it easy to implement hatnotes that take the form of a label in front of a list of pages, e.g.

Usage

labelledList

Invoking the labelledList function is enough to implement most such templates:

<nowiki>{{#invoke:Labelled list hatnote|labelledList|Universal label}}</nowiki>

or

<nowiki>{{#invoke:Labelled list hatnote|labelledList|Singular label|Plural label}}</nowiki>

For example, providing "See also" instead of "Universal label" duplicates the functionality of, while providing "Main article" and "Main articles" instead of "Singular label" and "Plural label" duplicates the (article namespace) functionality of .

If third and fourth labels are provided, they'll be used in the case where any of the target pages are outside the article namespace, so e.g. can be implemented thus:

<nowiki>{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}}</nowiki>

preprocessDisplays

The preprocessDisplays function takes a raw list of arguments and combines in any display arguments. For example,