跳至內容

模板:Subpage other/doc

維基百科,自由的百科全書

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

[編輯]

Template:Foo other see also