Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Revision as of 03:58, 21 February 2025 by Prd (talk | contribs) (Created page with "{{Documentation subpage}} == Usage == This template determines whether the page it is used on is a redirect or not. If it is used on a redirect, it returns its first parameter. Otherwise, it returns its second parameter. Either could be absent or empty. For example: {{tlx|Redirect other|yes|no}} will display <code>yes</code> on a redirect and <code>no</code> on a non-redirect (test: on this page, it says "{{redirect other|yes|no}}"); {{tlx|Redire...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Usage

This template determines whether the page it is used on is a redirect or not. If it is used on a redirect, it returns its first parameter. Otherwise, it returns its second parameter. Either could be absent or empty.

For example:

{{Redirect other|yes|no}}

will display yes on a redirect and no on a non-redirect (test: on this page, it says "no");

{{Redirect other|text}}

will display text on a non-redirect, and nothing on a redirect (test: on this page, it says "text");

{{Redirect other|text}}

will display text on a redirect, and nothing on a non-redirect (test: on this page, it says "").

Remember to place a "1=" and/or "2=" prefix on the arguments if they contain equals signs.

TemplateData

Displays different content based on whether it is used on a redirect or not.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
On redirect1

The text that's shown when the template is used on a redirect.

Unbalanced wikitextoptional
On non-redirect2

The text that's shown when the template is used on a non-redirect.

Unbalanced wikitextoptional