Template:Subpage other/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Andrybak
meta>Vanisaac
→‎See also: adding other subpage dependent templates
Line 13: Line 13:
==See also==
==See also==
* {{tl|Sandbox other}}
* {{tl|Sandbox other}}
* {{tl|Testcases other}}
* {{tl|Template other}}
* {{tl|Template other}}
* {{tl|Basepage subpage}}
<includeonly>{{sandbox other||
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
<!-- Categories below this line, please; interwikis at Wikidata -->

Revision as of 01:23, 4 May 2020

Usage

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: both Template:Infobox element isotopes and Template:Infobox element isotopes/infotable use documentation page Template:Infobox element isotopes/doc. 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