Templatology, an essay
Templates are one of MediaWiki’s most versatile features. I was thinking about them recently because of a discussion with other editors about whether a particular template should even exist, and if so, what should its wording be. Templates are a now ubiquitous part of English Wikipedia articles and MediaWiki wikis everywhere, so it may be interesting to look at how they have evolved. (Warning: this is quite long.)
What is a template?
Templates are a feature that provide “boilerplate” text or style, whenever you want to have a standard look or text across more than one page. In MediaWiki, to put a template called “foo” (that is, you would find it in the wiki at [[template:foo]]) on any page, you would put {{foo}}. They can also take “parameters”, or particular values that you can change for each time it is used: {{foo|parameter value 1|parameter value 2}}.
Various types of templates are referred to by other names, including infoboxes, naxboxes, notices and warnings, which more reflect the purpose of those templates.
Another name used is “tag”. When a template is used on a page, it creates a link in the database between the page name and the template. This means one use of templates is to mark pages that you want to group together for some reason. These grouped pages can then be found listed at Special:Whatlinkshere/Template:Foo. If you only wanted to use a template for this grouping purpose, you could make the template so it actually had no visible content. However categories usually make more sense for this purpose.
A history of templates
Templates as we know them today were first introduced in August 2004, MediaWiki v1.3, along with categories and the MonoBook skin still used today. Before this they were in the MediaWiki namespace with the “system messages” or user interface messages. With this move they also got the feature of “parameters”.
The first revision of the Help:Template page on meta was in June 2004 (I suppose by this stage they already had the practice of running the latest MediaWiki version live for Wikimedia sites, rather than the latest release which is typically after). The opening paragraph is now cute:
Templates, or custom messages, have grown from humble beginnings as an afterthought in a localisation feature. They are now used in almost 10% of pages in the English Wikipedia database.
I asked Duesentrieb to run a query like this, and apparently there are 229,686 en.wp main namespace non-redirect pages without templates – a very neat 10%. So from 10% usage to 90% usage in less than four years. Pretty impressive, especially given there is no edict mandating their use.
However, this is actually getting well ahead of ourselves. There is an interesting post from Larry Sanger in May 2001 called Do we need templates ?:
From: “Krzysztof P. Jasiutowicz”
> Do we need templates of pages ?
> Groups of pages – rock bands, biographies, film entries share common
> features and therefore want some kind of templates.
> Pages of the same category edited by different people tend to follow
> sometimes incompatible patterns or disagree with each other.
One of the reasons that Wikipedia works—why it is developing so quickly and is so attractive to contributors (compelling, one might say…) is that anyone can come in and contribute in practically any fashion. Instigating templates has a number of implications for how we might begin to think of Wikipedia: it would become a collection of standardized information rather than a collection of information that people just happen to feel inspired to input. Who is interested in inputting “standardized information”? Maybe some people, but surely not nearly as many as those who are interested in inputting whatever information they know.
Suppose we were to require (somehow) that everyone writing about the countries of the world input the information in exactly the format of the CIA Factbook. Who, honestly, would want to do that? And on the other hand, who would want to contribute a lot of generally accurate, useful information that will eventually add up to weighty, detailed articles, not necessarily all in the same format?
If I finish the quote here we can all enjoy a guffaw about how things have changed. I think his answer to the question Who is interested in inputting “standardized information”? has been shown to be wrong. Empty edit boxes freak people out. Structured stuff where you just fill out a missing bit here or there is much easier to deal with. (This is also why bots have been so successful in “seeding” wikis. It’s much easier to correct something that’s wrong, rather than write a correct paragraph from a blank slate.)
However, a fairer quote would include the following, where Larry clearly recognises that “it’s early days yet”:
Eventually, I suspect, we’re going to have huge amounts of information, and it will be possible for people to go in and render related entries in a similar format. It’s generally better to impose order after creation, in a way that reflects the natural categories of things as information is given. […] [I]n a constantly-growing, constantly-improving encyclopedia, why not just let people add whatever information they want, and when it’s reached a certain level of maturity, only then start imposing some uniformity on the way similar information is presented?
And that seems to be more or less what happened. I’m not great at this online ethnography biz, so I don’t have any other choice quotes from 2001 to 2004, although I expect there was further discussion about templates and their appropriateness.
What’s interesting is how far they’ve spread. While first imagined as kind of article skeleton structure, they’re now just as widely used in all kinds of talk pages, user pages, maintenance and communication tasks.
A taxonomy of templates
There are some broad classes of templates that can be described:
- The infobox. A subtype is the taxobox for species. These are the wiki equivalent of trading cards, really. Due to their enthusiastic take-up, you sometimes end up with 90% infobox, 10% text. The dream is to make it 100% infobox. ;) These templates work by “filling out” the specific characteristics for that particular article. It is precisely these kinds of templates that are used by DBpedia. They are much loved by other wiki owners, who should take note of Category:Infobox templates as “how do I get the cool boxes like Wikipedia” is a FAQ. They even have their own Manual of Style entry! They float right at the top of articles.
- The navbox (navigational). AKA series box? I’m not clear on how they differ. These templates are usually found at the bottom of articles or occasionally floating right (if there is no infobox, or below it). These group relatively small sets (<100?) of related articles, providing links from one to the others. If they get large, they are sometimes given "show"/"hide" JavaScript controls with "hide" by default. Unlike infoboxes, these ones usually have no parameters and display the same on all articles they are placed on.
- The humble stub or “short article” notice. It’s this notice which has inspired many an editor to contribute. This notice says, “OK, it’s looking pretty poor right now, but one day, it’ll get there.” These appear at the bottom of articles and don’t take parameters. There are different stub templates for different areas, and the stub notice also places the article in the appropriate stub category. This category thing is probably why hundreds of stub templates survive instead of being supersized into a single parameterised super-template. (Plus, if they were all in one, you couldn’t have stubmania!)
- The cleanup or ambox (article message box) template. Ambox is not a bad name, “amber box” – many of these are orange, denoting caution. These are used at the top of articles and mostly designate cleanup, quality and important administrative requests or cautions about the article. They were recently (September 2007) redesigned and the difference is remarkable. It looks significantly more professional (previously it was very haphazard), and the editors who managed to co-ordinate such a massive change and see it all the way through to implementation should be commended; such things are not easy nowadays.
- Inline templates are used to mark sources or lack of sources, mostly. The most famous one appears to be {{fact}} which produces [ citation needed ]. This template appears to be the feature most strongly associated with Wikipedia prose. To me it speaks of how editing Wikipedia can lead you to more routine critical thinking outside of Wikipedia. Question everything! Says who? What’s the source? There’s also stickers for some excellent culture jamming.
- License tags are almost exclusively used on file description pages (pages in the Image: namespace). This image is actually from Wikimedia Commons – hence the huge number of languages. The presence or absence of such templates is checked by bots that mark any uploaded files without a suitable template as “missing license” (and yep, they use another template to do that).
- Talk page templates. These typically give “meta information” about the article that is more relevant to editors rather than readers. Readers care if an article has been flagged as low quality; editors care an article falls into some wikiproject. The talk page templates went through a vote in April 2005 (see gallery). To be honest the ol’ coffee roll design is looking a bit tired, and could probably do with another update, maybe a parallel design to the amboxes.
I have the impression that talk page templates have exploded as of late, like maybe during 2007. Now virtually every article will have a talk page template proclaiming the article to be part of some wikiprojects, and that project’s accompanying quality assessment. Which you may consider to be wikiproject spam or not… it has certainly made false the assumption that “blue tabbed talk page = discussion of article”.
- The Request template. These templates put the page in a category that administrators should pay attention to, as the pleb user requests an administrator to make some change – editing, un/protecting or unblocking. (A missing one would be {{block}}, which I suppose hasn’t caught on. How could it work? The user it was intended for would simply remove it again.) I suppose {{db}} (“delete because”), the speedy deletion template, would also be considered to have this function, although it is clearly also an ambox. As the admin supplies or denies this request, they should remove the template.
Now into the user realm —
- Userboxes are small templates that editors adorn their userpage with. They have been a source of huge controversy in the past, but the dust has settled and they seem to be here to stay. According to the Signpost they were introduced in late March, 2005 in the form of Babel boxes (language proficiency templates). Interestingly Wikipedia:Babel says they were introduced to en.wp from Commons. The earliest revision of Commons:Babel is from 8 November 2004 (although it’s now deleted). Babel templates are pretty cool… they did spread quite memetically.
Looking at Meta now, it appears that some bright spark has recently (Feb 2008) decided to redesign the meta system from Babel into template:user language. It may be more efficient, but it’s a bit sad – having Babel boxes across the land was one nice thing to feel at home on any Wikimedia wiki. One of those unwritten norms I suppose.
Back to userboxes of all kinds, there was some serious userbox drama on the English Wikipedia in 2006. Now, userboxes are spread across three namespaces: template (for anything approaching useful I suppose), Wikipedia (for wikiprojects) and user (for everything else?). There is even a userbox code generator. Who doesn’t love a good userbox, eh?
- The user welcome template is definitely the oldest type of user communication (user talk page) template. The reasoning goes like this: new users should be welcomed, to help them feel part of the community. All new users usually need more or less the same info when they start, so here’s a standard list for copy and pasting. Well, you can put it in a template, and then just give everyone that template. But don’t make it look like a template — that way they’ll still think they got a personal message. (This is my guess at why [[template:welcome]] on English Wikipedia continues to resist decent formatting. One thing I spent some time on a while ago was prettifying the Commons welcome template.)
- The user warning template. You be breakin’ the rules, expect to be receivin’ these templates. I will write more about this style of template below.
Any other clear classes I missed? (There are a few I can think of which are pretty boring, hence not here.)
Template complexity
This is what you see when you edit the article on the Melbourne suburb of Hawthorn. Note how the template takes up the entire first screen, and it’s not even done! For a newbie it must be pretty bizarre — although frankly this one’s formatted quite well. But if you’re just trying to get into the guts of it (and remember newbies may not know about section editing), it’s quite “WRONG WAY, GO BACK”.
So there is the complexity of templates — and typically these infobox ones — within articles. Maybe one day MediaWiki will get some whiz-bang “template adder” for articles and all that ugly template code won’t appear in the edit box. That would be nice.
Then there is the complexity of trying to edit the templates themselves. This is nothing short of a nightmare. Template syntax is approaching a very ugly programming language, especially if you throw in parser functions. The migration to the new preprocessor (Feb 2008) has shown deeply nested templates all over the place.
I don’t really see a solution to this, unfortunately. People can’t help themselves “improving” stuff. Here is one way things get complex real fast:
- There are two or more functions that display different content but in a similar context.
- Someone decides to combine in them in a single template that takes a parameter, which says which content to display. The old templates get deleted/redirected.
- Helloooo, complexity.
Repeat this a few different times, at a few different levels, in a few different contexts, and suddenly you’ll find it all very difficult to try and untangle.
Convenience becomes necessity
All templates begin life because someone finds it easier to make a boilerplate and post that, rather than posting something longer, and having to look it up each time.
However once a template exists, the expectation soon develops that whenever it is applicable, it should be used, and the plain text equivalent should not. Even if previously, you could take or leave the plain text equivalent.
I don’t know why this happens, but it does — without fail.
Templates in user communication
This is actually the crux of what I intended to write about. :) In my 2007 Wikimania presentation I talked quite a bit about the wording, attitude and intent of the English Wikipedia user talk templates. I complained that the wording was often officious, scolding and impersonal, and they were not likely to encourage people to become part of the community.
In hindsight, maybe I had the wrong idea about them all along. John Broughton says this in Wikipedia:The Missing Manual (my review):
The primary purpose of a warning about vandalism or spam, perhaps counter-intuitively, is not to get the problem editor to change her ways. (It would be nice if they did so, but troublemakers aren’t like [sic] to reform themselves just because someone asked nicely.) Rather, when you and other editors post a series of increasingly strong warnings, you’re building a documented case for blocking a user account from further disruptive editing. If the warning leads to the editor changing his ways before blocking is necessary, great – but don’t hold your breath.
(Yes, the gender did change in the middle of that paragraph. :) Srsly, accept singular they already!)
If this is a widespread attitude, that you have to wait until someone receives a level 4 template before it’s legitimate to block them, then it’s not too surprising that there is so much trouble with “gaming” on en.wp. That IS a game, isn’t it? It’s hard for me to not see that situation as leading to punitive block. It’s certainly not leading to a preventative one!
I guess my problem with user warning templates is I have a feeling they don’t work. I have a feeling they don’t improve a situation. I have a feeling they don’t get read — users don’t pay attention to their content.
If there was evidence that anyone read them, learned something from them, or some situation was averted — that would be nice. [Of course such evidence would be anecdotal. That’s all we have when it comes to user interactions.]
Image deletion notification templates
When an uploaded file is nominated for deletion or is actually deleted, it is commonly considered courtesy to inform the uploader, via a template to their user talk page. If they didn’t receive this, they would have no idea their upload had been deleted until they tried to go look at it, which is a pretty nasty surprise. It’s now quite common to visit a user talk page and see a dozen odd notices about missing information on files. Because they are often placed by bots, many can pile up without a human there to notice, “OK, this person seriously doesn’t get this concept, time for a chat”. This is even more true on Commons.
These templates perform two functions: notification + admonishment. They would be better if they were simplified to a single line and only used for notification. Admonishment is something that should be between two humans.
Templates on Commons
There is one benefit to templates that I cannot ignore on Commons and it is that of translation. Translated templates may mean two users can “communicate” (of a fashion) despite not having any language in common.
Templates are for the benefit of the poster, not the receiver
The benefits are
- Save thinking about what to say
- Avoid saying something untrue or wrong or offensive
- Avoid confrontation with a person
- Deal with a situation as quickly as possible
Just as automated phone answering services are for the benefit of the company, not the caller.
Receiving a form reprimand is patronising. I am not the only one who has this emotional reaction – as Wikipedia has Don’t template the regulars.
It follows from this that templates are patronising to newbies too. I guess the only reason this is considered acceptable is that as they’re newbies, they won’t realise this template is a form response. (Well, except for how it’s totally generically worded, yeah.) So, since we’re all equal ‘n all, go ahead and template the regulars.
(So far there is no essay Don’t template the newbies. Instead, treat everyone equally badly. ;))
It would be very valuable to see an in-person observational study of people’s reactions as they learn to edit Wikipedia, including how they react to templates. Maybe the vast majority appreciate the “official” warning as it gives them some direction. Maybe they really do pay attention to them.
Maybe the problem is not the tool, but the way it’s being used. Maybe the only thing to do is take a sharp knife to the language that is used, and help resist the idea of messages as block precipitators, rather than messages as useful informers and educators.

Comment
== Convenience becomes necessity ==
I suppose this happens to help standardize these messages. For example, the short disambiguiation notes (templates like {{for}}) look exactly the same as if they were hardcoded (even if by “coded” we mean only “italicized”), but if e.g. for some reason the community decides to add a small icon on these messages, we only have to change the template, instead of all the articles.
== Image deletion notification templates ==
This really needs to be worked out, indeed. Just yesterday I had to remove two image deletion warning templates from magnus’ upload bot’s talk page, because the javascript added them automatically, instead of the real uploader.
And I hate when I see a user’s talk page full of warning templates with red links referring to images that don’t even exist anymore! Maybe Commons DeLinker should hide these templates when removing instances of the images that are deleted…
== Templates are for the benefit of the poster, not the receiver ==
This obviously should be reverted. The wording should be friendlier (it doesn’t make vandals change their mind anyway, at least it should be friendly and useful to the people who care to read it)
— Waldir · 11. March 2008, 04:45
The main difference between newbies and regulars is that there are much more newbies and most of them dont stay, so you would have to spend time and emotional energy on someone knowing that 9 from 10 times he wont edit more, wont even read your message. This can be pretty disheartening IMO.
As for the difficulty of editing, there is a cool gadget called Vorlagenmeister in the German Wikipedia, which makes it much easier.
— Tgr · 12. March 2008, 06:49
I find it kinda funny that Waldir used
"==" in his posting of a comment… I expect many of use let wikimarkup leak into other realms.
~~~~
(oops!)
— Lar · 12. March 2008, 11:12
Tgr, if they won’t even read the message, what is the point of leaving it? It’s not necessary to acknowledge every thing a person does, is it?
Vorlagen-Meister looks pretty cool, I wonder if anyone has ported it for English yet.
— pfctdayelise · 12. March 2008, 11:15
This was partially translated, and partially adapted, to the Spanish Wikipedia: Templatología (versión eswiki) by drini. Spanish screenshots and all. Awesome.
— pfctdayelise · 26. March 2008, 22:33
Commenting is closed for this article.
Wikimedia Commons goes 3D Ten possibly provoking thoughts about improving the quality of Swedish Wikipedia











