Template:No redirect/doc
This is a documentation subpage for Template:No redirect. It contains usage information, categories and other content that is not part of the original template page. |
'
This template uses Lua: |
This template provides an easy way to link a redirect page without following the redirect.
Usage
[edit]{{No redirect|page name|label}}
It accepts two unnamed parameters:
|1=
(required) the name of the page to link|2=
(optional) the text to be displayed; if this is omitted, then the input of the first parameter is used
Example
[edit]Instead of having to copy/paste or type:
[https://en.wikivoyage.org/w/index.php?title=Lafayette_GA&redirect=no ''Lafayette GA'']
- to yield Lafayette GA
…an editor can type:
''{{No redirect|Lafayette GA}}''
The second parameter (label) may be useful in discussions on talk pages. For example,
{{No redirect|Lafayette GA|this redirect}}
may appear on a talk page in this context: "For reference, see this redirect."
If there is no page with that name given by the first parameter, the template generates a redlink, as for any article name:
{{No redirect|Kolkata/Dum Dum}}
displays as Kolkata/Dum Dum
Also, if a page is not a redirect, a normal link is displayed:
{{No redirect|Saint Petersburg}}
displays as Saint Petersburg
TemplateData
[edit]This is the TemplateData for Template:No redirect, for use by TemplateWizard, VisualEditor and other tools.
Template description
Produces links directly to a redirect's target page when given the name of a redirect page
Parameter | Description | Type | Status | |
---|---|---|---|---|
Page name | 1 | The name of the page to link
| Page name | required |
Link text | 2 | The text to be shown linked to the redirect target; if this is omitted, then the value of the first parameter is used.
| Line | optional |
See also
[edit]- {{Redirect}} — hatnote "Foo redirects here …"
- Wikipedia:Redirect