109
edits
(With a template name depending on a parameter a kind of "case statement" is possible, where data used in multiple cases need to be) |
m (some fix broken links) |
||
| Line 4: | Line 4: | ||
*Including the same template more than five times in the same page works from version 1.4, now on http://test.wikipedia.org only. | *Including the same template more than five times in the same page works from version 1.4, now on http://test.wikipedia.org only. | ||
*The master version of this page, [[m:Help:Template]], is on Meta-Wikipedia; template demo's work there, but may not work if you are viewing a copy of that page on another project. | *The master version of this page, [[http://meta.wikimedia.org/wiki/index.php?title=Help:Template m:Help:Template]], is on Meta-Wikipedia; template demo's work there, but may not work if you are viewing a copy of that page on another project. | ||
__TOC__ | __TOC__ | ||
The '''template namespace''' is the [[Help:Namespace|namespace]] with prefix "'''Template:'''". | The '''template namespace''' is the [[Help:Namespace|namespace]] with prefix "'''Template:'''". | ||
A page in this namespace is called a '''template'''. The contents of such a page (either fixed or depending on parameters and/or [ | A page in this namespace is called a '''template'''. The contents of such a page (either fixed or depending on parameters and/or [http://en.wikipedia.org/wiki/Variables variable]s) is designed to be useful for insertion in other pages ([http://en.wikipedia.org/wiki/Transclusion transclusion], creating a [http://en.wikipedia.org/wiki/Compound_document compound document]). | ||
The syntax for insertion of the page "Template:''name''<nowiki>" is {{</nowiki>''name''<nowiki>}}</nowiki>. This is called a template tag. | The syntax for insertion of the page "Template:''name''<nowiki>" is {{</nowiki>''name''<nowiki>}}</nowiki>. This is called a template tag. | ||
This reference in the wikitext causes insertion of the template content when the referring page is rendered. Various equivalent terms are: | This reference in the wikitext causes insertion of the template content when the referring page is rendered. Various equivalent terms are: | ||
*[ | *[http://en.wikipedia.org/wiki/Call calling] the template | ||
*referring to the template | *referring to the template | ||
*including the template | *including the template | ||
edits