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

From blackwiki
Jump to navigation Jump to search
test>Incnis Mrsi
(Created page with '<noinclude>{{ombox|image=128px |text=The stuff below is a mediawikiwiki:Manual:Creating_pages_with_preloaded_text|preloaded templat...')
 
test>Mr. Stradivarius
(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: Line 1:
 
<noinclude>{{ombox|image=[[Image:Template-info.png|128px]]
 
<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’ documentation pages. It is not an actual documentation.}}
+
|text=The stuff below is a [[mediawikiwiki:Manual:Creating_pages_with_preloaded_text|preloaded template]] for modules' documentation pages. It is not actual documentation.}}
</noinclude>
+
</noinclude>{{module rating|<!-- Insert rating or delete if not needed. Values: "pre-alpha", "alpha", "beta", "release" and "protected". -->}}
{{module rating|alpha}}<!-- delete if this is not desirable -->
 
 
 
The module “{{BASEPAGENAME}}” contains (specify) available calls that make so and such.
 
  
 
== Usage ==
 
== Usage ==
  
  &#123;{#invoke:{{BASEPAGENAME}}|''function_name''<!-- fill an actual name -->|…}}
+
  &#123;{#invoke:{{BASEPAGENAME}}|''function_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 -->
 
  
== Examples ==
+
<include<includeonly></includeonly>only>{{#ifeq:{{SUBPAGENAME}}|sandbox||
{{Further|Module:{{BASEPAGENAME}}/testcases}}<!-- delete if you do not intend to create the red-linked page -->
+
<!-- Categories go here, and interwikis go in Wikidata -->
  
{<includeonly>{</includeonly>#invoke: {{BASEPAGENAME}} | main | test }}
+
}}</include<includeonly></includeonly>only>

Revision as of 13:48, 31 January 2014

Error: {{Module rating}} must be placed in the Module namespace.

Usage

{{#invoke:Documentation|function_name}}

<includeonly></includeonly>