Revision as of 19:47, 6 June 2021 by Mediawiki>Sdkb
You are an administrator.You are not an administrator.
Template documentation[ view · edit · history · purge ]
Usage
Example: {{If administrator|text for administrators|text for non-administrators}}
By default, <span>...</span>
tags are used to wrap the specified content. |tag=div
can be used if the content contains block-level elements.
TemplateData
Displays wikitext based on whether or not a user is an administrator.
Template parameters
Parameter | Description | Type | Status |
---|
If administrator | 1 | Wikitext to display if user is an administrator
| Content | suggested |
---|
If not administrator | 2 | Wikitext to display if user is not an administrator
| Content | suggested |
---|
Tag | tag | Changes the HTML tag used - Default
- span
- Example
- div
| Unknown | optional |
---|
See also
Namespace and pagename-detecting templates |
---|
Namespace | |
---|
Pagename | When on basepage | Detects and acts according to whether it is on a basepage or on any subpage (that is, a ../.. subpage). |
---|
When pagename is | For pattern matching on the pagename. |
---|
Module:Page | Can take apart and put together pagenames in several ways. |
---|
IP-talk | Returns IP-user talkpage, registered-user talkpage or non-user talkpage. |
---|
IP-user other | For detecting IP-user pages. |
---|
Subpage other | Pagename has an after-slash part (not in mainspace) |
---|
Sandbox other | Page is subpage /sandbox (template space) |
---|
Testcases other | Page is subpage /testcases (template space) |
---|
Rootpage other | Page is rootpage (vs. /subpage) (template space) |
---|
|
---|
Others | Stub other | Detects whether it is on a page with a stub template 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 different content to admins and non-admins. |
---|
If mobile | Displays different content to mobile users and desktop users. |
---|
If checkuser | Displays different content to checkusers and non-checkusers. |
---|
Noscript | Detects whether page is viewed with a JavaScript-capable client or not. |
---|
|
---|
|