Template:ARTICLEROOTPAGENAME/doc: Difference between revisions
Jump to navigation
Jump to search
ArrowHead294 (talk | contribs) mNo edit summary |
ArrowHead294 (talk | contribs) mNo edit summary |
||
Line 5: | Line 5: | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
|- | |- | ||
! Page title<br />({{ | ! Page title<br />(i.e. {{tl|FULLPAGENAME|plaincode}} ) !! Output of<br />{{<nowiki />ARTICLEROOTPAGENAME}} | ||
|- | |- | ||
| Template:ABC || rowspan="4" | Template:ABC | | Template:ABC || rowspan="4" | Template:ABC |
Revision as of 17:55, 22 May 2025
![]() |
This template may be substituted. |
ARTICLEROOTPAGENAME
is a pseudo-magic word that 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
, with an additional {{ARTICLESPACE}}
:{{ROOTPAGENAME}}
{{#if: }}
statement to avoid adding a colon on pages in the main (article) namespace (where it will return {{PAGENAME}}
instead).
Usage examples
Page title (i.e. {{FULLPAGENAME}} ) |
Output of {{ARTICLEROOTPAGENAME}} |
---|---|
Template:ABC | Template:ABC |
Template:ABC/DEF | |
Template talk:ABC | |
Template talk:ABC/DEF | |
ABC | ABC |
Talk:ABC | |
ABC/DEF | ABC/DEF |
Talk:ABC/DEF |