Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Subpage other/doc: Difference between revisions

Template page
m Text replacement - "{{High-use}}" to ""
No edit summary
 
Line 1: Line 1:
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
== Usage ==
== Usage ==
This template checks whether the current page is a subpage or not. A [[Wikipedia:Subpages|subpage]] is a page that has a slash:  
This template checks whether the current page is a subpage or not. A [[Wikipedia:Subpages|subpage]] is a page that has a slash:  

Latest revision as of 20:18, 1 July 2025

Usage[edit source]

This template checks whether the current page is a subpage or not. A subpage is a page that has a slash:

[[Template:Parentpage/Subpage]]

Exception: in article space (mainspace) the slash is part of the title, and there are no subpages. Example, AC/DC is a parent page not a subpage.

Usage example: We only want to categorise the parent page. So in the /doc page we add:

{{Subpage other|<!-- do not categorise -->|[[Category:Chemical element infobox]]}}
Note
WP:Subpage uses an other definition than magic word {{SUBPAGENAME}}. This template uses the former definition (pagename has an after-slash part).

See also[edit source]

  • {{Sandbox other}} — Distinguishes between the /sandbox subpages and the root template page and other subpages.
  • {{Template other}} — Distinguishes between pages in the template namespace and other namespaces.
  • {{When on basepage}} — Distinguishes between the root template page and subpages, without special consideration in the mainspace.
  • {{Subpage other}} — Distinguisheds between the root page and subpages (any subpage), classifying pagenames in the mainspace with a slash as being the root page.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.