Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Numinix MediaWiki Demo
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Help/Templates
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
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!
== Basic usage == <!--T:261--> </translate> <translate><!--T:3--> Templates are standard wiki pages whose content is designed to be '''[[<tvar name=1>Special:MyLanguage/Transclusion</tvar>|transcluded]]''' (embedded) inside other pages.</translate> <translate><!--T:468--> Templates follow a convention that the name is prefixed with "<tvar name=4><code>Template:</code></tvar>", assigning it to the [[<tvar name=2>Special:MyLanguage/Help:Namespaces</tvar>|template namespace]]; besides this, you can [[<tvar name=3>Special:MyLanguage/Help:Starting a new page</tvar>|create them like any other wiki page]].</translate> <translate> <!--T:325--> To transclude a template, you use double opening & closing curly brackets </nowiki></code></tvar>|template name}}. <!--T:4--> The simplest use of templates is as follows: Create a page called <tvar name=1><code>Template:Welcome</code></tvar> with the content below: </translate> <translate><!--T:5--> Hello! Welcome to the wiki.</translate> <translate> <!--T:6--> You have created your first template! Now, insert the code below in a new page: </translate> <nowiki></nowiki> <translate> <!--T:8--> When the new page is viewed, the text "Hello! Welcome to the wiki." will appear instead of <tvar name=1><code><nowiki></nowiki></code></tvar>. The template content is '''transcluded''' into the other page, i.e., it is integrated in the page. <!--T:9--> You can then insert <tvar name=1><code><nowiki></nowiki></code></tvar> at any point of any page where you wish to welcome someone. Suppose it is used in 100 pages. If you then change the template contents to: </translate> <translate><!--T:10--> Hi there! Welcome to this wonderful wiki.</translate> <translate> <!--T:11--> And revisit any of the 100 pages where the template was used, you'll see the new text instead of the original one. In this way, you have changed the content of 100 pages without editing them, because the template is transcluded into these pages. <!--T:12--> This is the basic mechanism. There are several additional features of transclusion that enrich this mechanism and make templates very useful. </translate> <translate>
Summary:
Please note that all contributions to Numinix MediaWiki Demo may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Project:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)