Template:Documentation/preload-module-doc: Difference between revisions

Content deleted Content added
Created page with '<noinclude>{{ombox|image=128px |text=The stuff below is a mediawikiwiki:Manual:Creating_pages_with_preloaded_text|preloaded templat...'
 
No edit summary
 
(24 intermediate revisions by 9 users not shown)
Line 1:
{{<noinclude>Tlx|</noinclude>Module rating|<!-- Values: pre-alpha • alpha • beta • release • protected • semiprotected -- If a rating not needed/relevant, delete this template call -->}}
<noinclude>{{ombox|image=[[Image:Template-info.png|128px]]
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->
|text=The stuff below is a [[mediawikiwiki:Manual:Creating_pages_with_preloaded_text|preloaded template]] for modules’ documentation pages. It is not an actual documentation.}}
</noinclude>
{{module rating|alpha}}<!-- delete if this is not desirable -->
 
The module “{{BASEPAGENAME}}” contains (specify) available calls that make so and such.
 
== Usage ==
<code><nowiki>{{</nowiki>#invoke:{{<includeonly>subst:</includeonly>BASEPAGENAME}}|''function_name''<nowiki>}}</nowiki></code>
 
<include<noinclude/>only>{{<noinclude>Tlx|</noinclude>Sandbox other||
&#123;{#invoke:{{BASEPAGENAME}}|''function_name''<!-- fill an actual name -->|…}}
<!-- Categories below this line; interwikis at Wikidata -->
 
}}</include<noinclude/>only>
== Parameters ==
 
<no<noinclude/>include>
The text below assumes that functions are declared as
<includeonly>[[Category:Module documentation pages]]</includeonly>
function p.''function_name''( frame )
</no<noinclude/>include>
<!-- delete this paragraph, it is indended for the module’s author, not a user -->
<noinclude>
 
{{Documentation|content=
* Positional parameters – the value of frame.args[1] is passed after ''function name'' and vertical bar, the value of frame.args[2] is passed after the value of frame.args[1] and vertical bar, and so on.<!-- rewrite the item -->
{{Preload notice|[[Module:Documentation]]}}
* Named parameters (specify them) – the same ''name''=''value'' syntax as in MediaWiki templates, are accessible inside the function as frame.args["''name''"].<!-- rewrite or delete the item -->
}}
 
</noinclude>
== Examples ==
{{Further|Module:{{BASEPAGENAME}}/testcases}}<!-- delete if you do not intend to create the red-linked page -->
 
{<includeonly>{</includeonly>#invoke: {{BASEPAGENAME}} | main | test }}