Module:Pagetype/doc
Jump to navigation
Jump to search
This is the documentation page for Module:Pagetype
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. This module can also be accessed using Template:Tl.
Syntax[edit source]
- Basic usage
{{#invoke:pagetype|main}}
- All parameters
{{#invoke:pagetype|main | page = | defaultns = | main = | user = | wikis wiki = | project = | ww = | file = | image = | mediawiki = | template = | help = | category = | portal = | book = | draft = | education program = | timedtext = | module = | topic = | special = | media = | talk = | redirect = | dab = | na = | other = }}
Basic usage[edit source]
For simple detection of the page type of the current page, use the default settings:
{{#invoke:pagetype|main}}
That will produce the following results, depending on the page type or the namespace:
Page type / namespace | Output |
---|---|
Redirects (in any namespace) | redirect
|
Main 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.
- Example
Code | Result |
---|---|
{{#invoke:pagetype|main}} |
module |
This module uses material from the Wikipedia module Module:Pagetype/doc, which is released under the Creative Commons Attribution-ShareAlike 3.0 Unported License (view authors). |