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!
== Possible uses of templates == <!--T:402--> </translate> <translate><!--T:403--> Templates can be used for any situation in which one wants two or more pages to contain identical or similar content that is edited together rather than independently.</translate> <translate><!--T:404--> They can be used to:</translate> * <translate><!--T:405--> Provide structured elements on many pages, like [[w:WP:Infoboxes|infoboxes]], [[w:WP:Template index|maintenance templates]], [[w:Template:navbox|navigational boxes]], etc.</translate> * <translate><!--T:406--> Perform calculations used as a programming tool on various pages, like [[w:Template:Sum]].</translate> * <translate><!--T:408--> Build composite pages that display the content of multiple existing pages together, like [[w:WP:Village pump (all)]] which includes content from each section of the village pump.</translate> <translate><!--T:409--> The content of these pages can either be shown individually, or together, but the revision history, watchlist, etc. will only pick up changes to the transcluded pages and the raw wikitext of the composite page itself, not implicit changes to the composite page.</translate> * <translate><!--T:410--> Share some content between a few related pages.</translate> <translate><!--T:411--> For example, the list at [[<tvar name=1>Special:MyLanguage/Help:Preferences#Beta features</tvar>|Help:Preferences#Beta features]] is duplicated at [[<tvar name=2>Special:MyLanguage/Beta Features#Current Beta Features</tvar>|Beta Features#Current Beta Features]].</translate> <translate><!--T:412--> While on <tvar name=2>MediaWiki.org</tvar> that is built using <tvar name=1></tvar> instead, it could have been done using a template.</translate> * <translate><!--T:413--> Store content referenced multiple times on the same page, so it only has to be written and calculated once.</translate> <translate><!--T:414--> For example [[w:Template:Cite Monumentenregister/URL]] is called twice by [[w:Template:Cite Monumentenregister]] in two different places, and using another template means the URL pattern only has to be written once in the base template.</translate> * <translate><!--T:415--> Use templates as a programming element to generate a loop: if Template:A calls Template:B 10 times with different parameters, then that crudely simulates a for loop.</translate> <translate><!--T:416--> If Template:B calls Template:C 10 times, then you have a nested loop of 100 calls of Template:C.</translate> <translate><!--T:417--> But keep in mind that it is easy to run into the [[<tvar name=1>Special:MyLanguage/Manual:Template limits</tvar>|template limits]] when using templates as advanced programming constructs, and using <tvar name=2></tvar> is generally clearer and easier to follow.</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)