Template:Sandbox: Difference between revisions
Jump to navigation
Jump to search
m (tweaking) |
(reorganize) |
||
(76 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude> |
<noinclude> |
||
Often you need to test an idea for a template, so try it out here. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
</noinclude> |
|||
If you try out the template here, you have to save the template and then preview to see how it works. You can instead edit [[Test sandbox template]]. |
|||
<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" --> |
|||
|- valign=top |
|||
| align=center | '''IN''' |
|||
| align=center | '''{{{method}}}''' |
|||
| algin=center | '''OUT''' |
|||
|- valign=top |
|||
⚫ | |||
| {{{comment}}} |
|||
| {{{out}}} |
|||
⚫ | |||
</div> |
|||
<noinclude> |
|||
⚫ | |||
: <big>'''Testing new template Template:PyMethod<strike></strike>'''</big> |
|||
⚫ | |||
⚫ | |||
== usage == |
|||
⚫ | |||
: <big>'''Testing: subpage parsing'''</big> |
|||
<nowiki>{{</nowiki> 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 --> |
|||
<nowiki>}}</nowiki> |
|||
; Goal |
|||
== samples == |
|||
: Given "Feature roadmap/Name of feature", return "Name of feature" |
|||
: Given "Just a title", return "Just a title" |
|||
<nowiki>{{</nowiki> Sandbox |
|||
| method = ShareActivity |
|||
| 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, 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 |
|||
| comment = Shares an activity with others }} |
|||
</noinclude> |
</noinclude> |
||
{{#sub: |
|||
⚫ | |||
{{#if: {{#pos:{{{1}}}|/}} | |
|||
{{#expr: {{#pos:{{{1}}}|/}} + 1}} | |
|||
{{#pos:{{{1}}}|/}} |
|||
}} |
|||
⚫ | |||
pos={{#pos:{{{1}}}|/}} |
|||
iftest={{#if: {{#pos:{{{1}}}|/}} | |
|||
yes | |
|||
no |
|||
}} |
Latest revision as of 01:31, 16 March 2009
Often you need to test an idea for a template, so try it out here.
- 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). -- User:Xavi
The idea of this {{Sandbox}} page is to have that, a simple testing template that will not interfere with others and avoid leaving a trail of botched attempts.
If you try out the template here, you have to save the template and then preview to see how it works. You can instead edit Test sandbox template.
See Also http://meta.wikimedia.org/wiki/Help:Template
Please leave this comment/text above for others to read.
- Testing: subpage parsing
- Goal
- Given "Feature roadmap/Name of feature", return "Name of feature"
- Given "Just a title", return "Just a title"
{{#sub:
{{{1}}} | Expression error: Unrecognized punctuation character "{".
}}
pos={{#pos:{{{1}}}|/}} iftest=yes