Template:Sandbox

From OLPC
Revision as of 20:01, 13 April 2007 by Xavi (talk | contribs) (tweaking)
Jump to navigation Jump to search

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