Module:Redirect/doc
Appearance
![]() | This is a documentation subpage for Module:Redirect. It may contain usage information, categories and other content that is not part of the original module page. |
This module accepts the name of a single page. It determines if the page is a redirect; if so it looks up the page, extracts the target, and returns the target name as text. Its usage is {{#invoke:redirect|main|redirect-page-name}}.
The template neither takes nor gives square brackets, so to show the result as a link use [[{{#invoke:redirect|main|redirect-page-name}}]]. An error is produced if the redirect does not exist, but for versatility no error is given if the file is not a redirect (returns the original text) or if the file name is blank (returns blank).
Example
{{#invoke:redirect|main|WP:AFC}}
produces
Wikipedia:Articles for creation