Editing
Template:Pagetype/doc
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Basic usage == For simple detection of the page type of the current page, use the default settings: {{pagetype}} That will produce the following results, depending on the page type or the [[WP:NAMESPACE|namespace]]: {| class="wikitable" ! Page type / namespace !! Output |- | Redirects (in any namespace) || <code>redirect</code> |- | Main namespace || <code>article</code> |- | File namespace || <code>file</code> |- | Template namespace || <code>template</code> |- | Category namespace || <code>category</code> |- | Module namespace || <code>module</code> |- | Other namespaces || <code>page</code> |} If the template is used on a talk page, it will detect the page type for the corresponding subject page. ; Example {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{pagetype}}</nowiki></code> || {{pagetype}} |} === Page parameter === You can use the <code>page</code> parameter to make the template act as though it was called from that page. {{pagetype|page=''page name''}} ; Examples {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{pagetype|page=United Kingdom}}</nowiki></code> || {{pagetype|page=United Kingdom}} |- | <code><nowiki>{{pagetype|page=UK}}</nowiki></code> || {{pagetype|page=UK}} |- | <code><nowiki>{{pagetype|page=Talk:United Kingdom}}</nowiki></code> || {{pagetype|page=Talk:United Kingdom}} |- | <code><nowiki>{{pagetype|page=File:Example.svg}}</nowiki></code> || {{pagetype|page=File:Example.svg}} |- | <code><nowiki>{{pagetype|page=Wikipedia:Namespace}}</nowiki></code> || {{pagetype|page=Wikipedia:Namespace}} |- | <code><nowiki>{{pagetype|page=TimedText:MS_Sam.ogg.en.srt}}</nowiki></code> || {{pagetype|page=TimedText:MS_Sam.ogg.en.srt}} |}
Summary:
Please note that all contributions to MycoTaxa may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
MycoTaxa:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Template
Discussion
English
Views
Read
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information
In other projects