Jump to content

Module:Pagetype/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mr. Stradivarius (talk | contribs) at 11:56, 25 October 2013 (add basic usage). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

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.