Template:Subpage other/doc: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>DePiep ←Created page with '{{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) --> ==...' |
m 6 revisions imported |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 8: | Line 8: | ||
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: | 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: | ||
:<code><nowiki>{{Subpage other|<!-- do not categorise -->|[[Category:]]}}</nowiki></code> | :<code><nowiki>{{Subpage other|<!-- do not categorise -->|[[Category:Chemical element infobox]]}}</nowiki></code> | ||
;Note: [[WP:Subpage]] uses an other definition than magic word <code><nowiki>{{SUBPAGENAME}}</nowiki></code>. This template uses the former definition (pagename has an after-slash part). | ;Note: [[WP:Subpage]] uses an other definition than magic word <code><nowiki>{{SUBPAGENAME}}</nowiki></code>. This template uses the former definition (pagename has an after-slash part). | ||
==See also== | ==See also== | ||
{{Foo other see also}} | |||
<includeonly>{{sandbox other|| | <includeonly>{{sandbox other|| | ||
<!-- Categories below this line, please; interwikis at Wikidata --> | <!-- Categories below this line, please; interwikis at Wikidata --> | ||
[[Category: | [[Category:Pagename manipulation templates]] | ||
[[Category:Template namespace templates]] | [[Category:Template namespace templates]] | ||
}}</includeonly> | }}</includeonly> |
Latest revision as of 17:38, 3 September 2020
This is a documentation subpage for Template:Subpage other. It may contain usage information, categories and other content that is not part of the original template page. |
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
- {{Sandbox other}} — Distinguishes between the /sandbox subpages and the root template page and other subpages.
- {{Testcases other}} — Distinguishes between the /testcases 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.