Template
Template is a feature in MediaWiki that allows for the creation of reusable content. Templates are used to insert the same content in multiple pages, to create visual structures, and to standardize pages. They are a fundamental part of the MediaWiki software, which powers websites like Wikipedia and Wikimedia Commons.
Overview[edit | edit source]
A template is a page created specifically for transclusion, a process that allows a piece of the same content to be included in multiple pages. When a template is updated, all pages that use the template will be automatically updated with the new content. This makes templates a powerful tool for maintaining consistent content across a large number of pages.
Templates are created using the "Template:" namespace, and their content is written in Wikitext, the markup language used by MediaWiki. The content of a template can include text, formatting, links, and other templates.
Usage[edit | edit source]
To use a template in a page, the name of the template is included in double curly braces, like this: Template:Template name. This is known as a template call. When the page is viewed, the MediaWiki software replaces the template call with the content of the template.
Templates can also be used with parameters, which are values that can be passed into the template to customize its content. Parameters are included in the template call, separated by vertical bars, like this: Template:Template name.
Types of Templates[edit | edit source]
There are several types of templates used in MediaWiki:
- Content templates are used to insert the same content in multiple pages. For example, a content template could be used to insert a standard warning message in multiple pages.
- Structure templates are used to create visual structures, such as infoboxes and navigation boxes. These templates often use complex table formatting.
- Function templates are used to perform complex functions, such as calculations and string manipulation. These templates use the ParserFunctions extension of MediaWiki.
See Also[edit | edit source]
Search WikiMD
Ad.Tired of being Overweight? Try W8MD's physician weight loss program.
Semaglutide (Ozempic / Wegovy and Tirzepatide (Mounjaro / Zepbound) available.
Advertise on WikiMD
WikiMD's Wellness Encyclopedia |
Let Food Be Thy Medicine Medicine Thy Food - Hippocrates |
Translate this page: - East Asian
中文,
日本,
한국어,
South Asian
हिन्दी,
தமிழ்,
తెలుగు,
Urdu,
ಕನ್ನಡ,
Southeast Asian
Indonesian,
Vietnamese,
Thai,
မြန်မာဘာသာ,
বাংলা
European
español,
Deutsch,
français,
Greek,
português do Brasil,
polski,
română,
русский,
Nederlands,
norsk,
svenska,
suomi,
Italian
Middle Eastern & African
عربى,
Turkish,
Persian,
Hebrew,
Afrikaans,
isiZulu,
Kiswahili,
Other
Bulgarian,
Hungarian,
Czech,
Swedish,
മലയാളം,
मराठी,
ਪੰਜਾਬੀ,
ગુજરાતી,
Portuguese,
Ukrainian
WikiMD is not a substitute for professional medical advice. See full disclaimer.
Credits:Most images are courtesy of Wikimedia commons, and templates Wikipedia, licensed under CC BY SA or similar.
Contributors: Prab R. Tumpati, MD