Help:Template: Difference between revisions

Jump to navigation Jump to search
m
link fix
m (link fix)
Line 9: Line 9:
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 [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]).
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 variables]) 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.
Line 23: Line 23:
*quoting interface messages in the MediaWiki namespace
*quoting interface messages in the MediaWiki namespace
*experimenting with templates in subpages of one's userpage
*experimenting with templates in subpages of one's userpage
*using the [[MediaWiki User's Guide: Image description page|description of an image]] for a caption
*using the [http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Image_description_page description of an image] for a caption


A template only works when referred to from a page in the same project. To use it in another project, one has to  copy it to there.
A template only works when referred to from a page in the same project. To use it in another project, one has to  copy it to there.
109

edits

Navigation menu