Template:Sandbox: Difference between revisions
Jump to navigation
Jump to search
m (tweaking) |
(reorganize) |
||
(65 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. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
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]]. |
|||
⚫ | |||
⚫ | |||
</noinclude><div style="font-size:66%; color:gray; display:{{{display|none}}}; border:1px solid darkgray; margin-left:10%; margin-right:5%; padding-left:5px; padding-right:5px; ">{{{1}}}</div><noinclude> |
|||
⚫ | |||
⚫ | |||
{{ Sandbox | |
|||
---- |
|||
... sample translated text ... |
|||
| display = block }} |
|||
⚫ | |||
<div style="font-size:66%; color:gray; display:block; border:1px solid darkgray; margin-left:10%; margin-right:5%; padding-left:5px; padding-right:5px; "> |
|||
... sample translated text ... |
|||
</div> |
|||
; Goal |
|||
== Usage == |
|||
: Given "Feature roadmap/Name of feature", return "Name of feature" |
|||
: Given "Just a title", return "Just a title" |
|||
⚫ | |||
<nowiki>{{</nowiki> Sandbox |
|||
{{#sub: |
|||
| someText |
|||
{{{1}}} | |
|||
| display = { block # Object is rendered as a block element. |
|||
{{#if: {{#pos:{{{1}}}|/}} | |
|||
none # Default. Object is not rendered. |
|||
{{#expr: {{#pos:{{{1}}}|/}} + 1}} | |
|||
inline # Object is rendered as an inline element sized by the dimensions of the content. |
|||
{{#pos:{{{1}}}|/}} |
|||
inline-block # Object is rendered inline, but the contents of the object are rendered as a block element. Adjacent inline elements are rendered on the same line, space permitting. |
|||
}} |
|||
list-item # Object is rendered as a block element, and a list-item marker is added. |
|||
}} |
|||
table-header-group # Table header is always displayed before all other rows and row groups, and after any top captions. The header is displayed on each page spanned by a table. |
|||
table-footer-group # } |
|||
<nowiki>}}</nowiki> |
|||
pos={{#pos:{{{1}}}|/}} |
|||
== Samples == |
|||
iftest={{#if: {{#pos:{{{1}}}|/}} | |
|||
yes | |
|||
<nowiki>{{</nowiki> Sandbox |
|||
no |
|||
| Welcome to the OLPC Wiki, home to collaborative notes about the One Laptop per Child project and related projects and communities. We currently have 1,664 pages and over one-thousand registered contributors; please join us and share your ideas.<nowiki>}}</nowiki> |
|||
}} |
|||
{{ Sandbox |
|||
| Welcome to the OLPC Wiki, home to collaborative notes about the One Laptop per Child project and related projects and communities. We currently have 1,664 pages and over one-thousand registered contributors; please join us and share your ideas.}} |
|||
: ''by default, it doesn't show...'' |
|||
<nowiki>{{</nowiki> Sandbox |
|||
| Welcome to the OLPC Wiki, home to collaborative notes about the One Laptop per Child project and related projects and communities. We currently have 1,664 pages and over one-thousand registered contributors; please join us and share your ideas. | display = block<nowiki>}}</nowiki> |
|||
{{ Sandbox |
|||
| Welcome to the OLPC Wiki, home to collaborative notes about the One Laptop per Child project and related projects and communities. We currently have 1,664 pages and over one-thousand registered contributors; please join us and share your ideas. | display = block}} |
|||
<nowiki>{{</nowiki> Sandbox |
|||
| Welcome to the OLPC Wiki, home to collaborative notes about the One Laptop per Child project and related projects and communities. We currently have 1,664 pages and over one-thousand registered contributors; please join us and share your ideas. | display = list-item<nowiki>}}</nowiki> |
|||
{{ Sandbox |
|||
| Welcome to the OLPC Wiki, home to collaborative notes about the One Laptop per Child project and related projects and communities. We currently have 1,664 pages and over one-thousand registered contributors; please join us and share your ideas. | display = list-item}} |
|||
⚫ |
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