Vikipedio:Lua/Moduloj/Saluton/en
Ŝablona programado | Diskutoj | Lua | Testoj | Subpaĝoj | ||||
---|---|---|---|---|---|---|---|---|
Modulo | Esperanto | English | Deutsch
|
Modulo: | Dokumentado |
Saluton
– module for demonstration of Lua usage within a Wiki-project.
Functions for templates
redakti- hello
- Returns a string like
Hello, world! This is Lua!
1
– (optional) name of the recipient- Default:
world
- Default:
Syntax example
redaktiFor templates this means:
- without parameter:
{{#invoke:Saluton|hello}}
- yields:
Saluton, mondo! Tio estas Lua!
- yields:
- with parameter:
{{#invoke:Saluton|hello|John Doe}}
- yields:
Saluton, John Doe! Tio estas Lua!
- yields:
Functions for Lua modules
redakti(None which could be called via require)
Local implementation
redakti- hello(frame)
- Returns the string.
frame
– Call environmentframe.args[ 1 ]
– Passed first unnamed parameter: name of the recipient
Dependencies
redakti(No other module required)
Usage
redaktiAny test scenario.
Origin
redakti- de:Modul:Hello, en:Module:Bananas and others.