From Wikipedia, the free encyclopedia
Checks whether {{ROOTPAGENAME}} = {{PAGENAME}}
Note: namespace is not checked. So: "Template:Foo" and "Category:Foo" test positive.
Main usage: in {{documentation}} subpage. To prevent subtemplates that use the same doc page to categorise.
Namespace and pagename-detecting templates |
|---|
| Namespace | |
|---|
| Pagename | |
|---|
| Others | | Stub other | Detects whether it is on a page with a stub template or not. |
|---|
| Redirect other | Detects whether it is on a redirect or not. |
|---|
| If preview | Detects whether page is viewed as a preview or not. |
|---|
| If IP | Displays different content to IP users and logged-in users. |
|---|
| If autoconfirmed | Displays different content to autoconfirmed and non-autoconfirmed users. |
|---|
| If extended confirmed | Displays different content to extended confirmed and non-extended confirmed users. |
|---|
| If administrator | Displays content only to admins. |
|---|
| If mobile | Displays different content to mobile users and desktop users. |
|---|
| If dark | Displays different content to dark mode users and light mode users. |
|---|
| Noscript | Detects whether page is viewed with a JavaScript-capable client or not. |
|---|
|
|---|
|