Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Help:Template
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==General description== [[File:Introduction to templates on Wikipedia.webm|thumb|A basic overview of how templates work (8-minute video)]] Most templates are in the [[WP:Template namespace|template namespace]], which means that they have titles in the form "Template:{{var|XXXX}}". It is possible, however, to transclude and substitute from any namespace,{{efn|Namespaces from which transclusion is not allowed are specified on a wiki by the variable <code>[[mw:Manual:$wgNonincludableNamespaces|$wgNonincludableNamespaces]]</code>.}} and so some template pages are placed in other namespaces, such as the [[WP:User pages|user namespace]]. Template pages have associated [[Help:Talk pages|talk pages]]. Templates can contain any desired [[Help:Wikitext|wikitext]], including calls to other templates. There is some programming ability: customizable values (via [[#Parameters|parameters]]); calculation and branchings (using [[Help:Parser functions|parser functions]]); and access to wiki-specific variables ([[Help:Magic words|magic words]]), such as dates, times, and page names. They may also contain markup to define certain parts of the page to be included while other parts are not. This means that when you display the template page itself, you may see more than when you display a page that includes it (for example, it can contain documentation, categories, etc. for the template). To call a template (cause it to be [[Help:Transclusion|transcluded]] or [[Help:Substitution|substituted]] in the page), a page contains wikitext in double braces. For example, the wikitext {{tnull|under construction}} calls the {{tl|under construction}} template. Sometimes the call includes parameters and looks like <code><nowiki>{{under construction|comment=This is a comment}}</nowiki></code>. Note that template calls are not the only thing for which double braces are used in wikitext. Note that while templates are the usual way transclusion and substitution happen on Wikipedia, they are not the only way.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)