Module:Sandbox/Luis150902/Test/doc: Difference between revisions
Appearance
Content deleted Content added
Sandbox edit |
m Replaced deprecated <source> tags with <syntaxhighlight> (via WP:JWB) |
||
Line 7: | Line 7: | ||
First, import the module as follows: |
First, import the module as follows: |
||
< |
<syntaxhighlight lang="lua"> |
||
local treeView = require('Module:Sandbox/Luis150902/Test') |
local treeView = require('Module:Sandbox/Luis150902/Test') |
||
</syntaxhighlight> |
|||
</source> |
|||
Second, invoke the treeView function of the module with the object to render and (optionally) an option table as the second argument. Wikitext of the table will be returned. |
Second, invoke the treeView function of the module with the object to render and (optionally) an option table as the second argument. Wikitext of the table will be returned. |
Latest revision as of 20:25, 7 May 2022
Usage
[edit]This Lua module is a metamodule: it is not designed to be invoked directly from wikitext: it is to be imported by other Lua modules.
First, import the module as follows:
local treeView = require('Module:Sandbox/Luis150902/Test')
Second, invoke the treeView function of the module with the object to render and (optionally) an option table as the second argument. Wikitext of the table will be returned.