Global templates/Taxonomy

This is an attempt to write a simple taxonomy of templates used on Wikimedia wikis: what templates are used for and how can they be grouped.

Making a full list of what templates are used for is challenging, because there are literally hundreds of thousands of them. The list in this document will just show several common, notable families of templates, but because of the nature of the technology, it cannot be truly comprehensive.

A central technical consideration is that the proposed repository of Global templates will be usable for all the templates, no matter to which “family” they belong (on an opt-in basis: no templates will be forced to be stored in the global repository). The templates are practically the only tool that the wiki editors have for customizing the content efficiently, and “content” here means everything that is written in the wikis: encyclopedic articles, discussions, policy pages, help pages, essays, transcribed books, translations, and everything else. The proposed repository is for all these scenarios.

Unless noted otherwise, the examples here are from the English Wikipedia, but it’s crucial to note that this doesn’t mean that the English Wikipedia is, or should be, the “source” for all templates. This is simply done for convenience given the original language in which this page is written. In fact, there is a lot of technical innovation in template development in other languages, particularly French, German, Russian, Spanish, Catalan, Polish, Hebrew, Persian, Arabic, Chinese, as well as many others. Some of these are mentioned specifically in this document.

Summary table
Each row is described in more detail in further paragraphs.

General citations
“Basic” footnotes are inserted using an extension called Cite, and this works equally in all languages using the  tag in wikitext. The actual content of most citations, however, is formatted using templates. Citation style requires uniform formatting. The most notable English Wikipedia templates of this kind are Cite web, Cite book, and Cite journal. There are dozens of others, and they are used in almost all articles.

Some of them were imported to many other languages, but their titles and parameters are not necessarily the same, so they cannot be reliably and efficiently reused across wikis, making translation harder. A very large number of bug reports about Content Translation, for example, involve templates.

They are also not machine-readable, at least not in a portable format: One can develop software to read citation metadata from the English Wikipedia, but it will have to be rewritten almost from scratch to read citation metadata from the French Wikipedia, the German Wikipedia, etc.

Particular source citations
These templates are similar to general citation templates, but they are done for particular sources that are needed on many pages. Examples in English: Cite Catholic Encyclopedia, Britannica (for citing Encyclopædia Britannica).

Structured citation: Cite Q
A particular notable example of a template that shows citations is Cite Q. It tries to combine the power of structured data in Wikidata with the citation needs of Wikipedia (in several languages!), and pulls the citation information from Wikidata. It was specifically developed for easy reuse across languages, in preparation for possible future migration to a global templates repository.

Citation infrastructure
These are templates and modules that are not used directly by article editors, but are used internally by other citation templates to create a uniform appearance. Notable examples are Module:Citation/CS1 and Module:Citation/CS1/COinS. These modules are often discussed as pieces of infrastructure that should be shared by all wikis.

Page metadata
Many templates implement article metadata. Some of them appear in the article namespaces, and others in the Talk space. Some of them are inserted into the article, but not actually shown to readers.

Article status badges
These are mostly badges such as Featured article, Good article, etc. They are inserted into the article wikitext source, but shown in the bar at the top of the page. While the functionality is similar, the particular design and internal implementation of this template may be different in each wiki. The “featured article” process is a sign of an active and caring editing community; the lack of such a template has been brought up multiple times by editors in smaller, but developing wikis as a blocker for strengthening the local editing community.

Internal information for editors
These are templates that are not shown to readers, but are supposed to communicate information that is useful to editors. In the English Wikipedia, for example, it suggests editors the dialect of English that must be used (Use American English, Use British English, Use Indian English, Use Nigerian English, etc.), or to use  a certain date format (e.g. Use dmy dates).

Metadata on talk pages
The Talk namespace was originally made for discussions about the article. Already in the mid-2000s, however, editors started using it also for storing metadata and maintenance templates for the editing community’s activities. A notable example is the English Wikipedia’s WikiProject templates, which sort articles by topics that are useful for experts in the editing community. For example, the talk page of the article Shanghai shows several such templates: WikiProject China, WikiProject Cities, WikiProject East Asia, WikiProject Politics, WikiProject Geography, and Wikipedia Version 1.0 Editorial Team.

This sorting was made by the English Wikipedia community to be used for its internal purposes, but it is so commonly used that it was used by the WMF Research team to sort articles into topics, and this sorting was subsequently applied to other languages and used for showing suggestions in the Growth extensions. While it has a useful result, this is also quite problematic because it forces the English Wikipedia community taxonomy on all the languages, without giving other communities a chance to influence it directly.

Similar WikiProject templates exist in Polish, Russian, Turkish, and other languages. Several languages expressed interest in reusing this system, but importing it was too complicated for them.

Another notable example is notifying editors about important community decisions about controversial topics. For example, the notices about English Wikipedia Arbitration Committee sanctions on the talk page of Kosovo are inserted using the generic Mbox template.

Infoboxes
This is one of the most notable examples of features implemented using templates.

There are hundreds of infobox templates in various wikis. Roughly, there are two types of those:


 * 1) Manual infoboxes, which require the adding of each parameter in the wikitext of the article itself.
 * 2) Automated infoboxes, which provide the formatting, but pull the actual information from Wikidata.

There’s also a wide spectrum of templates in between the two extremes: they can pull information by default, or under certain circumstances (for example, only if the Wikidata statement has a reliable source), but also allow the adding of information using parameters.

The manual templates are more common in the English Wikipedia, although the usage of Wikidata-based ones is gradually increasing. The automated ones are common in Russian, Spanish, French, Hebrew, and many other languages.

There is huge demand for both types of infoboxes in smaller languages. In particular, this was brought by many editors in languages of Africa and the Philippines, but really from the whole world.

Article maintenance templates
Many templates are used to draw the readers’ and editors’ attention to issues of article tone, neutrality, reliability, completeness, and so on. Sometimes it applies to the whole article, and sometimes to its parts. In the English Wikipedia, they are sometimes known as “tags” or “hatnotes”.

Such templates often add the article to a category, for example, Articles needing additional references. Such categories are known as Backlogs: editors can go through them and continuously improve the wiki. In the larger Wikipedias, there may be dozens or even hundreds of such categories.

Whole article
Examples of maintenance templates that apply to the whole article:


 * Unreferenced: “This article does not cite any sources.”
 * Current: “This article documents a current event. Information may change rapidly as the event progresses, and initial news reports may be unreliable.”
 * Underlinked: “This article needs more links to other articles to help integrate it into the encyclopedia.”
 * Disputed: “This article's factual accuracy is disputed. Relevant discussion may be found on the talk page.”

Some of these are now used in the Growth extensions, for example. This is a nice integration with community workflows, but it also means that if a wiki wants to use the corresponding Growth feature, the template must exist and work in a way that is compatible with the extension, and this must be done in every wiki manually. If the template was global, this could be done effortlessly in all wikis.

Parts of an article
Perhaps the best known, iconic maintenance template that applies to a part of an article is citation needed. It’s used when some words in the article may be true, but there may be doubt about them and a reference should be added. It’s very common in the English Wikipedia, and in many other languages. In some languages, it’s also common to mark to which words exactly this template applies; it is possible in English, too, but it’s less common.

Visual Editor has some special support for this template: It can show an extra panel that shows the reason for the doubt, and a button for quick adding of a reference. This support is not universal, however: even if the template exists, this window must be configured manually on every wiki by writing a JSON file. So a wiki that wants to use it must create the template and the JSON file. This is a demonstration of how the lack of a global templates repository makes the development of WMF products inefficient.

This template is not just a signifier of doubt—it is a part of an editing workflow. Like some other maintenance templates, it adds the article to a backlog category categorized by date. Many editors go through these categories and improve these articles.

In addition to “citation needed”, there are other templates of this kind, such as clarify and who. For example, the English Wikipedia article Park Güell says (as of June 2022): "On the other hand, many experts have tried to link the park to various symbols because of the complex iconography that Gaudí applied to the urban project."

The “[who?]” badge alerts the readers that this may be a “weasel word” and invites editors to add a specific citation.

Navigation boxes
Navigation templates, also known in English as “navboxes”, appear in a very large number of Wikipedia articles. They usually include links to articles on a related topic, and are manually curated by editors. Because an encyclopedia covers thousands of topics and every navigation box has up to several dozens of links, there are thousands of navigation templates.

Navigation boxes are used for various topics. For example, a navigation article about a musician, such as Neil Young, may show a list of their albums, collaborators, side projects, and other related subjects.

Several navigation templates may appear in the same article. For example, the article Nancy Pelosi has Nancy Pelosi, a navigation box for topics directly related to Pelosi herself, as well as several others, grouped under “Links to related articles”: Democratic Party, US House Speakers, US House Leaders, US Order of Precedence, and more.

Navigation templates can appear in different locations in the article, but typically they are used on one of these three locations:


 * 1) At the bottom of the article: common with articles about people or groups.
 * 2) In the beginning: common in more abstract topics such as Psychology sidebar (e.g. in Cognitive bias) or Islam (e.g. in Hajj).
 * 3) In the middle: when a section in an article is related to another topic.

That said, practices may fluctuate in different topics and languages.

Such templates may include red links, which signify that the target of the red link is related to the theme and there is supposed to be an article about it, but the article was not written yet.

They appear not just in the English Wikipedia, but in many other languages. The aforementioned Neil Young navbox appears in seven other languages with similar content.

Navigation boxes are useful for both editors and readers, for topic organization and for getting more information about related subjects. At the moment, however, they are completely hidden from mobile users because of the difficulty to adapt their styling to mobile screens. With the current technology, this adaptation is possible, but it would have to be made for each wiki separately. If, at least, there was the same basic implementation shared across wikis, this would only have to be done once. Many users have asked to show them on mobile screens, but this wasn’t done yet.