Template:Sandbox: Difference between revisions

From OLPC
Jump to navigation Jump to search
(new Sandbox for Templates (and avoid botched attempts ;))
 
(reorganize)
 
(85 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
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
[[Category:Template]]
[[Category:Template]]
</noinclude>
<div style="border-top:1px solid #888888; border-bottom:1px solid #888888; margin:0px;">
{| width="100%" cellpadding="0" cellspacing="0"
|-
|width=25% align=left bgcolor=#C3D9FF|&#8592; '''[[OLPC Human Interface Guidelines/{{{prev}}}/lang-{{{lang}}}|{{:OLPC Human Interface Guidelines/{{{prev}}}/lang-{{{lang}}}/title}}]]'''
|width=50% align=center bgcolor=#C3D9FF|'''[[OLPC Human Interface Guidelines/{{{curr}}}/lang-{{{lang}}}|{{:OLPC Human Interface Guidelines/{{{curr}}}/lang-{{{lang}}}/title}}]] [[{{NAMESPACE}} talk:OLPC Human Interface Guidelines/{{{curr}}}/lang-{{{lang}}}|<font color="white"><b>(talk page)</b></font>]]'''
|width=25% align=right bgcolor=#C3D9FF| '''[[OLPC Human Interface Guidelines/{{{next}}}/lang-{{{lang}}}|{{:OLPC Human Interface Guidelines/{{{next}}}/lang-{{{lang}}}/title}}]]''' &#8594;
|}
</div><noinclude>
Structure assumed by this template is as follows:


''Please leave this comment/text above for others to read.''
----

: <big>'''Testing: subpage parsing'''</big>

; Goal
: Given "Feature roadmap/Name of feature", return "Name of feature"
: Given "Just a title", return "Just a title"


* OLPC Human Interface Guidelines
** /previousPageName - ''the previous original chapter in english''
*** /lang-xx - ''the translation of the previous chapter into 'xx'''
**** /title - ''the translated title of the previous chapter into 'xx'''
** /currentPageName - ''the current original chapter in english''
*** /lang-xx - ''the translation of the current chapter into 'xx'''
**** /title - ''the translated title of the current chapter into 'xx'''
** /nextPageName - ''the next original chapter in english''
*** /lang-xx - ''the translation of the next chapter into 'xx'''
**** /title - ''the translated title of the next chapter into 'xx'''
</noinclude>
</noinclude>
{{#sub:
{{{1}}} |
{{#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