Difference between revisions of "Template:FULLROOTPAGENAME/doc"

(Creation (as this is needed))
 
m (Text replacement - "Category:Wikipedia metatemplates" to "Category:Metatemplates")
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 
<!-- Please add categories at the bottom of this page, and interwikis at Wikidata (see Wikipedia:Wikidata) -->
 
<!-- Please add categories at the bottom of this page, and interwikis at Wikidata (see Wikipedia:Wikidata) -->
{{used in system}}
 
  
 
Get the namespace and the root of the page name. It is similar to the template {{tl|FULLBASEPAGENAME}}, but returns the '''root''' of the page hierarchy instead of the '''parent'''.  
 
Get the namespace and the root of the page name. It is similar to the template {{tl|FULLBASEPAGENAME}}, but returns the '''root''' of the page hierarchy instead of the '''parent'''.  
Line 36: Line 35:
 
<includeonly>{{sandbox other||
 
<includeonly>{{sandbox other||
 
<!-- Add categories below this line, and interwikis at Wikidata -->
 
<!-- Add categories below this line, and interwikis at Wikidata -->
[[Category:Wikipedia metatemplates]]
+
[[Category:Metatemplates]]
[[Category:Wikipedia magic word templates]]
+
[[Category:Magic word templates]]
 
}}</includeonly>
 
}}</includeonly>

Latest revision as of 02:38, 10 May 2023

Get the namespace and the root of the page name. It is similar to the template {{FULLBASEPAGENAME}}, but returns the root of the page hierarchy instead of the parent.

Usage[edit]

  • {{FULLROOTPAGENAME}} → Template:FULLROOTPAGENAME
  • {{FULLROOTPAGENAME|Template:1x/sandbox}} → Template:1x
  • {{FULLROOTPAGENAME|Wikipedia:Administrators' noticeboard/Arbitration enforcement/Archive1}} → Wikipedia:Administrators' noticeboard

In namespaces with subpages disabled, it will return the full page name:

Note that this template can be substituted.

TemplateData[edit]

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools.

TemplateData for FULLROOTPAGENAME

A meta template that takes a page name and returns its root page name (including namespace).

Template parameters

ParameterDescriptionTypeStatus
Page name1

The input page name. If omitted or empty, the current page name will be used

Pageoptional

See also[edit]