Modiwl:Redirect/doc: Gwahaniaeth rhwng fersiynau
Cynnwys wedi'i ddileu Cynnwys wedi'i ychwanegu
Crëwyd tudalen newydd yn dechrau gyda '{{used in system}} {{Module rating|beta}} This module contains functions to find the target of a redirect page. == Main == The main f...' |
Xqbot (sgwrs | cyfraniadau) B Bot: Replace deprecated <source> tag and "enclose" parameter [https://lists.wikimedia.org/pipermail/wikitech-ambassadors/2020-April/002284.html] |
||
Llinell 26:
To use this, first load the module.
<
local mRedirect = require('Module:Redirect')
</syntaxhighlight>
Then use the function with the following syntax:
<
mRedirect.luaMain(rname, bracket)
</syntaxhighlight>
<var>rname</var> is the name of the redirect page, and if <var>bracket</var> is anything but false or nil, the module will produce a link rather than just a page name.
Llinell 50:
The isRedirect can be accessed from other Lua modules in the same way as the main function:
<
local mRedirect = require('Module:Redirect')
mRedirect.luaIsRedirect(rname)
</syntaxhighlight>
== GetTarget ==
Llinell 61:
To use it, first load the module.
<
local mRedirect = require('Module:Redirect')
</syntaxhighlight>
Then use the function with the following syntax:
<
mRedirect.getTarget(page)
</syntaxhighlight>
<var>page</var> can be either the name of the redirect page as a string, or a [[mw:Extension:Scribunto/Lua reference manual#Title objects|mw.title object]].
|