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.
 
<sourcesyntaxhighlight lang="lua">
local mRedirect = require('Module:Redirect')
</syntaxhighlight>
</source>
 
Then use the function with the following syntax:
 
<sourcesyntaxhighlight lang="lua">
mRedirect.luaMain(rname, bracket)
</syntaxhighlight>
</source>
 
<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:
 
<sourcesyntaxhighlight lang="lua">
local mRedirect = require('Module:Redirect')
mRedirect.luaIsRedirect(rname)
</syntaxhighlight>
</source>
 
== GetTarget ==
Llinell 61:
To use it, first load the module.
 
<sourcesyntaxhighlight lang="lua">
local mRedirect = require('Module:Redirect')
</syntaxhighlight>
</source>
 
Then use the function with the following syntax:
 
<sourcesyntaxhighlight lang="lua">
mRedirect.getTarget(page)
</syntaxhighlight>
</source>
 
<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]].