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...'
 
get rid of most of this, as I have found myself just deleting it most of the time; also, add the category code from Template:Documentation/preload, which will be useful for modules too
Line 1:
<noinclude>{{ombox|image=[[Image:Template-info.png|128px]]
|text=The stuff below is a [[mediawikiwiki:Manual:Creating_pages_with_preloaded_text|preloaded template]] for modules’modules' documentation pages. It is not an actual documentation.}}
</noinclude>{{module rating|<!-- Insert rating or delete if not needed. Values: "pre-alpha", "alpha", "beta", "release" and "protected". -->}}
</noinclude>
{{module rating|alpha}}<!-- delete if this is not desirable -->
 
The module “{{BASEPAGENAME}}” contains (specify) available calls that make so and such.
 
== Usage ==
 
&#123;{#invoke:{{BASEPAGENAME}}|''function_name''<!-- fill an actual name -->|…}}
 
== Parameters ==
 
The text below assumes that functions are declared as
function p.''function_name''( frame )
<!-- delete this paragraph, it is indended for the module’s author, not a user -->
 
* 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 -->
* 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 -->
 
<include<includeonly></includeonly>only>{{#ifeq:{{SUBPAGENAME}}|sandbox||
== Examples ==
<!-- Categories go here, and interwikis go in Wikidata -->
{{Further|Module:{{BASEPAGENAME}}/testcases}}<!-- delete if you do not intend to create the red-linked page -->
 
{}}</include<includeonly>{</includeonly>#invoke: {{BASEPAGENAME}} | main | test }}only>