Wikipedia:Tip of the day/May 9

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Using templates

Templates are a type of page that contain boilerplate text that is intended to be displayed on more than one page in Wikipedia.

This Tip of the day box is an example of a template (there are several versions actually), and besides being displayed here it is displayed on many userpages as well.

Template names start with the prefix "Template:" followed by the page name. The main version of the template you are reading right now is called "Template:totd".

To display a template on a page, go to the target page, click "edit", and add the template's name (with or without the prefix) surrounded by double curly brackets to the page's source text. (The text you see in the edit box when you click edit this page is called "source text", because it is a lot like programming code, which is called "source code").

Including a template on a page in this way is called "transclusion". Here's an example:

To include the Template:Philosophy topics, type this at the end of the philosophy article you wish to place it on::

{{Philosophy topics}}

Read more: Template messages

Prior tip - Next tip