Module:Pagetype/doc
Appearance
| This is a documentation subpage for Module:Pagetype. It may contain usage information, categories and other content that is not part of the original module page. |
This module is used to detect the page type of a given page. It detects redirect pages automatically and is highly customisable. It can be used on its own or as a meta-module to create other page-type-detection templates.
Basic usage
For simple detection of the page type of the current page, use the default settings:
{{#invoke:pagetype|main}}
That will produce the following results:
| Page type / namespace | Output |
|---|---|
| Redirects (in any namespace) | redirect
|
| Article namespace | article
|
| File namespace | file
|
| Template namespace | template
|
| Category namespace | category
|
| Module namespace | module
|
| Book namespace | book
|
| Other namespaces | page
|
If the module is used on a talk page, it will detect the page type for the corresponding subject page.