Difference between revisions of "Template:FULLROOTPAGENAME/doc"

From blackwiki
Jump to navigation Jump to search
imported>MSGJ
(→‎Usage: try talk)
imported>Redrose64
(→‎See also: rm strange syntax)
 
(11 intermediate revisions by 7 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
+
<!-- Please add categories at the bottom of this page, and interwikis at Wikidata (see Wikipedia:Wikidata) -->
{{high-risk| 770,000+ }}
+
{{high-use| 770,000+ |all-pages=y }}
 +
{{used in system}}
  
Get the full root page name of the current or the given page. It is similar to the template {{tl|FULLBASEPAGENAME}}, but returns the root of the page hierarchy instead of the parent. In namespaces with no subpages, it will return either the given pagename or <nowiki>{{</nowiki>[[WP:VAR|FULLPAGENAME]]<nowiki>}}</nowiki>.
+
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'''.  
  
This template can be substituted.
+
=== Usage ===
 +
* {{tlx|FULLROOTPAGENAME}} → {{FULLROOTPAGENAME}}
 +
* {{tlx|FULLROOTPAGENAME|Template:1x/sandbox}} → {{FULLROOTPAGENAME|Template:1x/sandbox}}
 +
* {{tlx|FULLROOTPAGENAME|Wikipedia:Administrators' noticeboard/Arbitration enforcement/Archive1}} → {{FULLROOTPAGENAME|Wikipedia:Administrators' noticeboard/Arbitration enforcement/Archive1}}
  
=== Usage ===
+
In namespaces with subpages disabled, it will return the full page name:
* {{tlx|FULLROOTPAGENAME}} &rarr; {{FULLROOTPAGENAME}}
+
* {{tlx|FULLROOTPAGENAME|List of 28 Days/Weeks Later characters}} {{FULLROOTPAGENAME|List of 28 Days/Weeks Later characters}}
* {{tlx|FULLROOTPAGENAME|<nowiki></nowiki>}} &rarr; {{FULLROOTPAGENAME|}}
 
* {{tlx|FULLROOTPAGENAME|Wikipedia talk:Administrators' noticeboard/Arbitration enforcement/Archive1}} &rarr; {{FULLROOTPAGENAME|Wikipedia talk:Administrators' noticeboard/Arbitration enforcement/Archive1}}
 
* {{tlx|FULLROOTPAGENAME|List of 28 Days/Weeks Later characters}} &rarr; {{FULLROOTPAGENAME|List of 28 Days/Weeks Later characters}}
 
  
== See also ==
+
Note that this template can be substituted.
* [[mw:Help:Magic words#Page names]]
 
* {{tl|FULLBASEPAGENAME}}
 
* {{tl|ROOTPAGENAME}}
 
  
==Template data==
+
== TemplateData ==
{{TemplateDataHeader}}
+
{{TemplateData header}}
 
<templatedata>{
 
<templatedata>{
 
   "description": "A meta template that takes a page name and returns its root page name (including namespace).",
 
   "description": "A meta template that takes a page name and returns its root page name (including namespace).",
Line 32: Line 30:
 
}</templatedata>
 
}</templatedata>
  
<includeonly>
+
== See also ==
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
+
* [[mw:Help:Magic words#Page names]]
[[Category:Wikipedia metatemplates|{{PAGENAME}}]]
+
* {{tl|FULLBASEPAGENAME}}
 +
* {{tl|ROOTPAGENAME}}
  
</includeonly>
+
<includeonly>{{sandbox other||
 +
<!-- Add categories below this line, and interwikis at Wikidata -->
 +
[[Category:Wikipedia metatemplates]]
 +
[[Category:Wikipedia variable-like templates]]
 +
}}</includeonly>

Latest revision as of 12:24, 10 January 2020

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

  • {{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

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

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