Template:ARTICLEROOTPAGENAME/doc: Difference between revisions
ArrowHead294 (talk | contribs) mNo edit summary |
ArrowHead294 (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
{{dochead}} | {{dochead}} | ||
Returns the associated content namespace (e.g. "Template" if used on a page in the "Template" or "Template talk" namespace), followed by the root of the page name in namespaces where automatic subpages are enabled, or the | Returns the associated content namespace (e.g. "Template" if used on a page in the "Template" or "Template talk" namespace), followed by the root of the page name in namespaces where automatic subpages are enabled, or the page name without the namespace otherwise. It is equivalent to <code><nowiki>{{</nowiki>[[mw:Help:Magic words#Namespaces|ARTICLESPACE]]<nowiki>}}:{{</nowiki>[[mw:Help:Magic words#Namespaces|ROOTPAGENAME]]<nowiki>}}</nowiki></code>, with an additional <code><nowiki>{{</nowiki>[[mw:Help:Extension:ParserFunctions|#if: ]]<nowiki>}}</nowiki></code> statement to avoid adding a colon on pages in the main (article) namespace. | ||
=== Examples === | === Examples === | ||
Line 19: | Line 19: | ||
| Talk:ABC | | Talk:ABC | ||
|- | |- | ||
| ABC/DEF || ABC/DEF | | ABC/DEF || rowspan="2" | ABC/DEF | ||
|- | |- | ||
| Talk:ABC/DEF | | Talk:ABC/DEF | ||
|} | |} |