More actions
No edit summary |
No edit summary |
||
| Line 5: | Line 5: | ||
== Usage == | == Usage == | ||
This template checks whether the current page is a subpage or not. A | This template checks whether the current page is a subpage or not. A subpage is a page that has a slash: | ||
:''<nowiki>[[Template:Parentpage/Subpage]]</nowiki>'' | :''<nowiki>[[Template:Parentpage/Subpage]]</nowiki>'' | ||
Exception: in article space (mainspace) the slash is part of the title, and there are no subpages. Example, | 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: | Usage example: We only want to categorise the parent page. So in the /doc page we add: | ||
:<code><nowiki>{{Subpage other|<!-- do not categorise -->|[[Category:Chemical element infobox]]}}</nowiki></code> | :<code><nowiki>{{Subpage other|<!-- do not categorise -->|[[Category:Chemical element infobox]]}}</nowiki></code> | ||
;Note: | ;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== | ||
Revision as of 06:24, 8 April 2025
| This page uses Creative Commons Licensed content from Wikipedia (view authors). |
| 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: 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).