Wikiup:Lua/Modul/Vorlage:Soft redirect/en
aus Wikipedia, der freien Enzyklopädie
< Wikiup:Lua | Modul | Vorlage:Soft redirect
Vorlagenprogrammierung | Diskussionen | Lua | Unterseiten | |||
Modul | Deutsch | English
|
Modul: | Dokumentation |
Vorlage:Soft redirect
– Module for generation of correct interwiki links in Template:Soft redirect.
Functions for Templates
- f
- Standard task: create link in internal format.
- Parameter (of template transclusion):
- 1
- Link target (with or without leading colon
:
). - 2
- optional
- Link text.
- failsafe
- Version management
{{Wikipedia:Lua/Modul-Failsafe/en|Modul=Vorlage:Soft redirect}}
Usage
Functions for Lua modules (API)
Functions described above can be used by other modules:
local lucky, Softredirect = pcall( require, "Module:Softredirect" )
if type( Softredirect ) == "table" then
Softredirect = Softredirect.Softredirect()
else
-- failure; Softredirect is the error message
return "<span class='error'>" .. Softredirect .. "</span>"
end
Subsequently there are available:
- Softredirect.failsafe( atleast )
- Versioning interface
- atleast
optional
nil or minimum version orwikidata
or~
for synchronisation
- atleast
- returns: Version ID as string or
false
Dependencies
None.