You are not logged in.You are currently logged in.
Usage
Example: {{If IP|text for IP users|text for logged in users}}
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
Template parameters[Edit template data]
Parameter | Description | Type | Status |
---|
If IP | 1 yes | Wikitext to display if user is not logged in
| Content | suggested |
---|
If user | 2 no | Wikitext to display if user is logged in
| Content | suggested |
---|
tag | tag | Changes the HTML tag used - Default
- span
- Example
- div
| Unknown | optional |
---|
See also
Namespace and pagename-detecting templates |
---|
Namespace | Particular |
- [[Template:{{{2}}}|{{{2}}}]]
- [[Template:{{{2}}}|{{{2}}}]]
- [[Template:{{{2}}}|{{{2}}}]]
- [[Template:{{{2}}}|{{{2}}}]]
- [[Template:{{{2}}}|{{{2}}}]]
- [[Template:{{{2}}}|{{{2}}}]]
- [[Template:{{{2}}}|{{{2}}}]]
- [[Template:{{{2}}}|{{{2}}}]]
- [[Template:{{{2}}}|{{{2}}}]]
- [[Template:{{{2}}}|{{{2}}}]]
- [[Template:{{{2}}}|{{{2}}}]]
- [[Template:{{{2}}}|{{{2}}}]]
- [[Template:{{{2}}}|{{{2}}}]]
- [[Template:{{{2}}}|{{{2}}}]]
- [[Template:{{{2}}}|{{{2}}}]]
|
---|
More generic |
- [[Template:{{{2}}}|{{{2}}}]]
- [[Template:{{{2}}}|{{{2}}}]]
- [[Template:{{{2}}}|{{{2}}}]]
- [[Template:{{{2}}}|{{{2}}}]]
- [[Template:{{{2}}}|{{{2}}}]]
|
---|
|
---|
Pagename | [[Template:{{{2}}}|{{{2}}}]] | Detects and acts according to whether it is on a basepage or on any subpage (that is, a ../.. subpage). |
---|
[[Template:{{{2}}}|{{{2}}}]] | For pattern matching on the pagename. |
---|
Module:Page | Can take apart and put together pagenames in several ways. |
---|
[[Template:{{{2}}}|{{{2}}}]] | Returns IP-user talkpage, registered-user talkpage or non-user talkpage. |
---|
[[Template:{{{2}}}|{{{2}}}]] | For detecting IP-user pages. |
---|
[[Template:{{{2}}}|{{{2}}}]] | Pagename has an after-slash part (not in mainspace) |
---|
[[Template:{{{2}}}|{{{2}}}]] | Page is subpage /sandbox (template space) |
---|
[[Template:{{{2}}}|{{{2}}}]] | Page is subpage /testcases (template space) |
---|
[[Template:{{{2}}}|{{{2}}}]] | Page is rootpage (vs. /subpage) (template space) |
---|
|
---|
Others | [[Template:{{{2}}}|{{{2}}}]] | Detects whether it is on a page with a stub template or not. |
---|
[[Template:{{{2}}}|{{{2}}}]] | Detects whether it is on a redirect or not. |
---|
[[Template:{{{2}}}|{{{2}}}]] | Detects whether page is viewed as a preview or not. |
---|
[[Template:{{{2}}}|{{{2}}}]] | Displays different content to IP users and logged-in users. |
---|
[[Template:{{{2}}}|{{{2}}}]] | Displays different content to autoconfirmed and non-autoconfirmed users. |
---|
[[Template:{{{2}}}|{{{2}}}]] | Displays different content to extended confirmed and non-extended confirmed users. |
---|
[[Template:{{{2}}}|{{{2}}}]] | Displays content only to admins. |
---|
[[Template:{{{2}}}|{{{2}}}]] | Displays different content to mobile users and desktop users. |
---|
[[Template:{{{2}}}|{{{2}}}]] | Detects whether page is viewed with a JavaScript-capable client or not. |
---|
|
---|
|