Content deleted Content added
←Created page with '{{used in system}} {{Module rating|beta}} == Main function == The 'main' function of this module accepts the name of a single page. It determines if the page is...' |
No edit summary Tags: Mobile edit Mobile web edit |
||
Line 4:
The 'main' function of 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 <nowiki>{{#invoke:redirect|main|redirect-page-name}}</nowiki>.
The template normally neither takes nor gives square brackets, so to show the result
a link use <nowiki>[[{{#invoke:redirect|main|redirect-page-name}}]]</nowiki>. 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). However, if the parameter ''bracket'' is given a nonblank value, brackets will be passed on if present.
|