Vorlage:Namespace detect/Doku: Unterschied zwischen den Versionen
Vorlage:Namespace detect/Doku (Quelltext anzeigen)
Version vom 2. Februar 2009, 21:39 Uhr
, vor 17 JahrenSome fixes to the doc text since the "image" namespace was renamed to "file".
K (interwiki) |
imported>Davidgothberg (Some fixes to the doc text since the "image" namespace was renamed to "file".) |
||
| Zeile 9: | Zeile 9: | ||
:'''main''' = Main/article space, as in normal Wikipedia articles. | :'''main''' = Main/article space, as in normal Wikipedia articles. | ||
:'''talk''' = Any talk space, such as page names that start with "Talk:", "User talk:", " | :'''talk''' = Any talk space, such as page names that start with "Talk:", "User talk:", "File talk:" and so on. | ||
:'''user, wikipedia, file, mediawiki, template, help, category''' and '''portal''' = The other namespaces except the talk pages. | :'''user, wikipedia, file, mediawiki, template, help, category''' and '''portal''' = The other namespaces except the talk pages. | ||
:'''other''' = Any namespaces that were not specified as a parameter to the template. See explanation below. | :'''other''' = Any namespaces that were not specified as a parameter to the template. See explanation below. | ||
For backwards compatibility this template also understands the old name '''image''' for '''file''', although using '''image''' is deprecated. | |||
'''Note!''' For most usage cases it might be better to use the simpler namespace detection templates. (See the [[#See also|see also]] section below.) Since this template is more prone to human errors such as misspelling the parameter names. | '''Note!''' For most usage cases it might be better to use the simpler namespace detection templates. (See the [[#See also|see also]] section below.) Since this template is more prone to human errors such as misspelling the parameter names. | ||
| Zeile 84: | Zeile 84: | ||
<pre> | <pre> | ||
{{namespace detect | demospace = main | {{namespace detect | ||
| demospace = main | |||
| main = Article text | | main = Article text | ||
| other = Other pages text | | other = Other pages text | ||
| Zeile 92: | Zeile 93: | ||
No matter on what kind of page the code above is used it will return this: | No matter on what kind of page the code above is used it will return this: | ||
:{{namespace detect | demospace = main | :{{namespace detect | ||
| demospace = main | |||
| main = Article text | | main = Article text | ||
| other = Other pages text | | other = Other pages text | ||
| Zeile 123: | Zeile 125: | ||
* {{tl|main other}} – For article templates. | * {{tl|main other}} – For article templates. | ||
* {{tl|talk other}} – For talk page templates. | * {{tl|talk other}} – For talk page templates. | ||
* {{tl|image other}} – For image templates. | * {{tl|image other}} – For file (image) templates. | ||
* {{tl|category other}} – For category templates. | * {{tl|category other}} – For category templates. | ||