मोड्युल:Pagetype/doc
स्वरूप
This is the documentation page for मोड्युल:Pagetype
This Lua module is used on ६,१००,०००+ pages. To avoid major disruption and server load, any changes should be tested in the module's /sandbox or /testcases subpages. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing. |
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 {{pagetype}}.
Syntax
[स्रोत सम्पादन]- Basic usage
{{#invoke:pagetype|main}}
- All parameters
{{#invoke:pagetype|main | page = | defaultns = | main = | user = | wikipedia = | project = | wp = | file = | image = | mediawiki = | template = | help = | category = | portal = | book = | draft = | education program = | timedtext = | module = | topic = | special = | media = | talk = | redirect = | dab = | na = | other = }}
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, depending on the page type or the namespace:
Page type / namespace | Output |
---|---|
Redirects (in any namespace) | redirect
|
Main namespace | लेख
|
File namespace | चित्र
|
Template namespace | ढाँचा
|
Category namespace | श्रेणी
|
Module namespace | मोड्युल
|
Book namespace | पुस्तक
|
Other namespaces | पृष्ठ
|
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 |