Template:Sandbox: Difference between revisions
Jump to navigation
Jump to search
(testing a new to categorize) |
(reorganize) |
||
(12 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude> |
<noinclude> |
||
Often you need to test an idea for a template, so try it out here. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
[[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]]. |
|||
⚫ | |||
⚫ | |||
</noinclude><span class="plainlinks">''{{{title|Google}}}{{#if:{{{ar|}}}||'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Car&hl=en&ie=UTF-8&oe=UTF-8 {{#language:ar}}]}}{{#if:{{{de|}}}||'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cde&hl=en&ie=UTF-8&oe=UTF-8 {{#language:de}}]}}{{#if:{{{es|}}}||'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Ces&hl=en&ie=UTF-8&oe=UTF-8 {{#language:es}}]}}{{#if:{{{fr|}}}||'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cfr&hl=en&ie=UTF-8&oe=UTF-8 {{#language:fr}}]}}{{#if:{{{it|}}}||'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cit&hl=en&ie=UTF-8&oe=UTF-8 {{#language:it}}]}}{{#if:{{{ja|}}}||'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cja&hl=en&ie=UTF-8&oe=UTF-8 {{#language:ja}}]}}{{#if:{{{ko|}}}||'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cko&hl=en&ie=UTF-8&oe=UTF-8 {{#language:ko}}]}}{{#if:{{{pt|}}}||'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cpt&hl=en&ie=UTF-8&oe=UTF-8 {{#language:pt}}]}}{{#if:{{{ru|}}}||'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cru&hl=en&ie=UTF-8&oe=UTF-8 {{#language:ru}}]}}{{#if:{{{zh|}}}||'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Czh-CN&hl=en&ie=UTF-8&oe=UTF-8 {{#language:zh-CN}}]}}''</span> |
|||
[[Category: |
[[Category:Template]] |
||
[[Category:Missing translation{{#if:{{{ar|}}}||s lang-ar}}]] |
|||
[[Category:Missing translation{{#if:{{{de|}}}||s lang-de}}]] |
|||
[[Category:Missing translation{{#if:{{{es|}}}||s lang-es}}]] |
|||
[[Category:Missing translation{{#if:{{{fr|}}}||s lang-fr}}]] |
|||
[[Category:Missing translation{{#if:{{{it|}}}||s lang-it}}]] |
|||
[[Category:Missing translation{{#if:{{{ja|}}}||s lang-ja}}]] |
|||
[[Category:Missing translation{{#if:{{{ko|}}}||s lang-ko}}]] |
|||
[[Category:Missing translation{{#if:{{{pt|}}}||s lang-pt}}]] |
|||
[[Category:Missing translation{{#if:{{{ru|}}}||s lang-ru}}]] |
|||
[[Category:Missing translation{{#if:{{{zh|}}}||s lang-zh}}]] |
|||
<noinclude> |
|||
<includeonly>[[Category:Missing translation lang-{{{lang|{{{1}}}}}}|{{PAGENAME}}]]</includeonly><noinclude> |
|||
⚫ | |||
== Usage == |
|||
---- |
|||
⚫ | |||
<nowiki>{{</nowiki>{{PAGENAME}} |
|||
| title = <!-- OPTIONAL -- title (defaults to 'Google'; --> |
|||
| ar = ''none'' <!-- OPTIONAL -- hides link for arabic translation; --> |
|||
| de = ''none'' <!-- OPTIONAL -- hides link for german translation; --> |
|||
| es = ''none'' <!-- OPTIONAL -- hides link for spanish translation; --> |
|||
| fr = ''none'' <!-- OPTIONAL -- hides link for french translation; --> |
|||
| it = ''none'' <!-- OPTIONAL -- hides link for italian translation; --> |
|||
| ja = ''none'' <!-- OPTIONAL -- hides link for japanese translation; --> |
|||
| ko = ''none'' <!-- OPTIONAL -- hides link for korean translation; --> |
|||
| pt = ''none'' <!-- OPTIONAL -- hides link for portuguese translation; --> |
|||
| ru = ''none'' <!-- OPTIONAL -- hides link for russing translation; --> |
|||
| zh = ''none'' <!-- OPTIONAL -- hides link for chinese (simplified) translation --> |
|||
<nowiki>}}</nowiki> |
|||
; Goal |
|||
== Sample == |
|||
: Given "Feature roadmap/Name of feature", return "Name of feature" |
|||
: Given "Just a title", return "Just a title" |
|||
The following are all equivalents, as they all generate a <tt>REDIRECT</tt> directive to the upper level |
|||
<nowiki>{{</nowiki>{{PAGENAME}}|es=none<nowiki>}}</nowiki> |
|||
{{{{PAGENAME}}|es=none}} |
|||
[[Category:Template|{{PAGENAME}}]] |
|||
[[Category:Templates using ParserFunctions|{{PAGENAME}}]] |
|||
</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