Difference between revisions of "Template:Usage"
From Spherical
(HTML) |
(Doc) |
||
Line 1: | Line 1: | ||
− | <div class="sph-usage">{{#if: {{{object}}} | [[API:{{{object}}}|{{{object}}}]]. | }}'''{{{func}}}'''(''{{{params}}}'');</div> | + | <includeonly><div class="sph-usage">{{#if: {{{object}}} | [[API:{{{object}}}|{{{object}}}]]. | }}'''{{{func}}}'''(''{{{params|}}}'');</div></includeonly> |
+ | |||
+ | <noinclude>Use this template to demonstrate Sphere API. Template parameters include: | ||
+ | |||
+ | * '''object''' ''(optional)'' - The Sphere object this function is a member of, if any | ||
+ | * '''func''' - The name of the function | ||
+ | * '''params''' ''(optional)'' - A comma-separated list of function parameters, if any | ||
+ | |||
+ | For example, <tt><nowiki>{{Usage|object=sound|func=play|params=repeat}}</nowiki></tt> will result in: | ||
+ | |||
+ | {{Usage|object=sound|func=play|params=repeat}} | ||
+ | </noinclude> |
Revision as of 19:00, 20 May 2013
Use this template to demonstrate Sphere API. Template parameters include:
- object (optional) - The Sphere object this function is a member of, if any
- func - The name of the function
- params (optional) - A comma-separated list of function parameters, if any
For example, {{Usage|object=sound|func=play|params=repeat}} will result in:
sound.play(repeat);