Template:Sandbox: Difference between revisions

From OLPC
Jump to navigation Jump to search
(testing for a Task template)
(reorganize)
 
(46 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.
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).


: 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 [[Template:Sandbox]] is to have that, a simple testing zone that will not interfere with others and avoid leaving a trail of botched attempts.


The idea of this {{tl|Sandbox}} page is to have that, a simple testing template 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
[[Category:Template]]


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]].
: <big>'''Testing Task<strike></strike>'''</big>


'''See Also''' http://meta.wikimedia.org/wiki/Help:Template
</noinclude>
[[Category:Template]]
<includeonly><div style="border:1px black gray; background:666; float:right">


''Please leave this comment/text above for others to read.''
Duration: {{{duration}}} {{{unit}}}
----


: <big>'''Testing: subpage parsing'''</big>
Category: {{{category}}}


; Goal
</div></includeonly><noinclude>
: Given "Feature roadmap/Name of feature", return "Name of feature"
: Given "Just a title", return "Just a title"


</noinclude>
This template allows to place tags to denote something that needs further work. The parameter will be used to display the type of 'pending activity'. Currently it has been thought out to mark places where examples are needed.
{{#sub:
{{{1}}} |
{{#if: {{#pos:{{{1}}}|/}} |
{{#expr: {{#pos:{{{1}}}|/}} + 1}} |
{{#pos:{{{1}}}|/}}
}}
}}


pos={{#pos:{{{1}}}|/}}
Pages tagged with this template will automatically be included in the [[:Category:Pending]] for easy retrieval.
iftest={{#if: {{#pos:{{{1}}}|/}} |

yes |
== Usage ==
no

}}
<nowiki>{{</nowiki> Task
| duration = &lt;!-- a number denoting the estimated time required --&gt;
| unit = &lt;!-- { minutes | hours | days | weeks | months | years } --&gt;
| category = &lt;!-- { Programming | Education | Organizing } --&gt;
<nowiki>}}</nowiki>

== Samples ==

<br clear="all">
{{ Sandbox | duration = 8 | unit = hours | category = Programming }}
<nowiki>{{ Sandbox | duration = 8 | unit = hours | category = Programming }}</nowiki>
</noinclude>

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