Module:Arguments/doc: Difference between revisions
From The Kodiak Republic Wiki
Content added Content deleted
(→Basic use: add some headers) |
(→Recommended practice: make this easier to digest for idiots like me) |
||
Line 49: | Line 49: | ||
return p |
return p |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
The way this is called from a template is <code>{{#invoke:Example|main}}</code> (optionally with some parameters like <code>{{#invoke:Example|main|arg1=value1|arg2=value2}}</code>), and the way this is called from a module is <syntaxhighlight lang=lua inline>require('Module:Example')._main({arg1 = value1, arg2 = value2})</syntaxhighlight>. |
|||
=== Multiple functions === |
=== Multiple functions === |