Template:If administrator/doc

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

This template is used to show text to administrators but not non-administrators.

Example: {{If administrator|text for administrators}} will display the text "text for administrators" to administrators but will hide the text from 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.

It is not currently possible to display text only for non-administrators (i.e. hide text from administrators). See MediaWiki talk:Common.css/Archive 19 § Interface-protected edit request on 14 February 2022.

TemplateData

[edit source]

Displays wikitext based on whether or not a user is an administrator.

Template parameters

ParameterDescriptionTypeStatus
If administrator1

Wikitext to display if user is an administrator

Contentsuggested
tagtag

Changes the HTML tag used

Default
span
Example
div
Unknownoptional

See also

[edit source]