Jump to content

Module:Redirect/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Wnt (talk | contribs) at 23:16, 16 April 2013 (I think I already encouraged someone to use this, but I hope it's really up to being an alpha). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

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 Redirect-page-name.

The template neither takes nor gives square brackets, so to show the result as a link use 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).