Template:Sandbox: Difference between revisions

From OLPC
Jump to navigation Jump to search
(trying future Template PyMethod)
m (tweaking)
Line 11: Line 11:
<div style="border-top:1px solid #888888; border-bottom:1px solid #888888; margin:0px;">
<div style="border-top:1px solid #888888; border-bottom:1px solid #888888; margin:0px;">
{| width="100%" cellpadding="0" cellspacing="0" <!-- style="background-color:#0093d0; color:white" -->
{| width="100%" cellpadding="0" cellspacing="0" <!-- style="background-color:#0093d0; color:white" -->
|- valign=top
|-
| align=center | '''IN'''
| align=center | '''IN'''
| align=center | '''{{{method}}}'''
| align=center | '''{{{method}}}'''
| algin=center | '''OUT'''
| algin=center | '''OUT'''
|- valign=top
|-
| {{{in}}}
| {{{in}}}
| {{{comment}}}
| {{{comment}}}
Line 47: Line 47:
| method = ShareActivity
| method = ShareActivity
| in = s: activity id, s: activity type, s: name, a{sv}: properties
| in = s: activity id, s: activity type, s: name, a{sv}: properties
| out = o
| comment = Shares an activity with others }}
----
<nowiki>{{</nowiki> Sandbox
| method = ShareActivity
| in = s: activity id,<br>s: activity type,<br>s: name,<br>a{sv}: properties
| out = o
| comment = Shares an activity with others
<nowiki>}}</nowiki>
{{Sandbox
| method = ShareActivity
| in = s: activity id,<br>s: activity type,<br>s: name,<br>a{sv}: properties
| out = o
| out = o
| comment = Shares an activity with others }}
| comment = Shares an activity with others }}

Revision as of 20:01, 13 April 2007

Many times you may want to just 'test' an idea for a template, I haven't found a sensible way of fully testing templates by themselves (as they will not get included in the edited version, but rather the saved version).

The idea of this Template:Sandbox is to have that, a simple testing zone that will not interfere with others and avoid leaving a trail of botched attempts.

Please leave this comment/text for others to read.
See Also http://meta.wikimedia.org/wiki/Help:Template


IN {{{method}}} OUT
{{{in}}} {{{comment}}} {{{out}}}


Testing new template Template:PyMethod

usage

{{ Sandbox
   | method     =  <-- name of the function/method -->
   | comment    =  <-- description of the method -->
   | in         =  <-- list of arguments / parameters -->
   | in_notes   =  <-- OPTIONAL - notes on the arguments / parameters -->
   | out        =  <-- return value -->
   | out_notes  =  <-- OPTIONAL - notes on the returned value -->
}}

samples

{{ Sandbox 
   | method = ShareActivity 
   | in = s: activity id, s: activity type, s: name, a{sv}: properties
   | out = o
   | comment = Shares an activity with others
}}


IN ShareActivity OUT
s: activity id, s: activity type, s: name, a{sv}: properties Shares an activity with others o

{{ Sandbox 
   | method = ShareActivity 
   | in = s: activity id,
s: activity type,
s: name,
a{sv}: properties | out = o | comment = Shares an activity with others }}


IN ShareActivity OUT
s: activity id,
s: activity type,
s: name,
a{sv}: properties
Shares an activity with others o