Jump to content

Module:Module sandbox/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Blanked the page
Tags: Blanking Reverted Mobile edit Mobile web edit
Restored revision 1280025421 by Awesome Aasim (talk)
 
Line 1: Line 1:
{{Lua autodoc|file=Module sandbox|preface=
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
== Usage ==

<code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}{{!}}''function_name''<nowiki>}}</nowiki></code>

== Example ==

<code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}{{!}}main<nowiki>}}</nowiki></code> yields:

{{#invoke:Module sandbox|main}}

|autodoc=1|infobox=0}}
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->

}}</includeonly>

Latest revision as of 08:12, 23 April 2025


Usage

{{#invoke:Module sandbox|function_name}}

Example

{{#invoke:Module sandbox|main}} yields:

Hello world!

Documentation

Package items

sandbox.hello_world(name) (function)
Prints hello world
Parameter: name Person to address (string)
Returns: hello world string
TODO: make it say "Hello, [name]".
sandbox.main(frame) (function)
Main entrypoint.
Parameter: frame calling frame (table)
Returns: output wikitext