Content deleted Content added
adding and removing namespaces |
add custom namespace values, redirects, and the other parameter |
||
Line 10:
{| class="wikitable"
! Page type / [[WP:NAMESPACE|namespace]] !! Output
|-
| Redirects (in any namespace) || <code>redirect</code>
Line 87:
The following values will all work to remove namespace values: "<code>no</code>", "<code>n</code>", "<code>false</code>" or "<code>0</code>". They can be used in any combination of upper and lower case.
=== Custom namespace values ===
It is possible to specify a custom value for any namespace:
{{#invoke:pagetype|main
| main = ''custom text''
| user = ''custom text''
| wikipedia = ''custom text''
| project = ''custom text''
| wp = ''custom text''
| file = ''custom text''
| image = ''custom text''
| mediawiki = ''custom text''
| template = ''custom text''
| help = ''custom text''
| category = ''custom text''
| portal = ''custom text''
| book = ''custom text''
| education program = ''custom text''
| timedtext = ''custom text''
| module = ''custom text''
| special = ''custom text''
| media = ''custom text''
}}
=== Talk parameter ===
Normally, the module will treat talk pages as if they were in the corresponding subject namespace. However, if the <code>talk</code> parameter is set, the module will treat talk pages separately from subject pages. The <code>talk</code> parameter sets values for all talk pages, i.e. pages in the Talk: namespace, pages in the User talk: namespace, pages in the Wikipedia talk: namespace, and so on.
{{#invoke:pagetype|main|talk=''yes''}}
{{#invoke:pagetype|main|talk=''custom text''}}
The default value for "<code>talk=''yes''</code>" is "talk page".
=== Main namespace classes ===
Line 110 ⟶ 145:
=== Custom main namespace classes ===
It is also possible to
{{#invoke:pagetype|main|''class''|dab=''yes''|na=''yes''}}
{{#invoke:pagetype|main|''class''|dab=''custom
This works the same way that it does for the custom namespace page types. Possible parameters are:
* '''dab''': a custom value for disambiguation-class pages. If set to "<code>yes</code>", "<code>y</code>", "<code>true</code>" or "<code>1</code>", this produces "disambiguation page". If set to "<code>no</code>", "<code>n</code>", "<code>false</code>" or "<code>0</code>", no custom value is produced. If set to any other value it produces that text.
* '''na''': a custom value for NA-class pages. It works in the same way as the <code>dab</code> parameter. The default value for "<code>yes</code>" etc. is "page".
=== Redirects ===
By default, the module automatically detects redirects in all namespace. It is not possible to specify redirect behaviour by namespace, but you can turn redirect detection off, or use a custom value for redirect pages.
{{#invoke:pagetype|main|redirect=''no''}}
{{#invoke:pagetype|main|redirect=''custom text''}}
=== Other namespaces ===
By default, the module produces "<code>page</code>" if used from a namespace that hasn't been specified. This value can be changed with the {{para|other}} parameter:
{{#invoke:pagetype|main|other=''custom text''}}
|