Module:RedirectData: Difference between revisions
Appearance
Content deleted Content added
←Created page with 'local p = {} function p.getRedirectToNamespace(frame) titleObject = mw.title.getCurrentTitle() redirectTarget = titleobject.redirectTarget return redirectTa...' |
m fix |
||
Line 3: | Line 3: | ||
function p.getRedirectToNamespace(frame) |
function p.getRedirectToNamespace(frame) |
||
titleObject = mw.title.getCurrentTitle() |
titleObject = mw.title.getCurrentTitle() |
||
redirectTarget = |
redirectTarget = titleObject.redirectTarget |
||
return redirectTarget |
return redirectTarget |
||
end |
end |
Revision as of 05:36, 13 February 2021
This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing. |
This Lua module is used on approximately 38,000 pages and changes may be widely noticed. Test changes in the module's /sandbox or /testcases subpages, or in your own module sandbox. Consider discussing changes on the talk page before implementing them. |
Usage
This module can be used on redirect pages to display the namespace that the page redirects to. This should generally be wrapped by templates.
{{#invoke:RedirectData|getRedirectToNamespace}}
See also
- {{Automatic redirect categories}}, a template which uses this module
- {{R from shortcut}}, another template which uses this module