Template:Tinker check: Difference between revisions

update to use #switch
mNo edit summary
(update to use #switch)
Line 1: Line 1:
<includeonly>
<includeonly>{{#switch: {{{1}}}
{{#ifexpr: {{{1}}} < 4 | [[Tinker I]] | {{#ifexpr: {{{1}}} < 7 | [[Tinker II]] | [[Tinker III]] }} }}
| 0
</includeonly>
| 1
<noinclude>
| 2
| 3 = [[Tinker I]]
| 4
| 5
| 6 = [[Tinker II]]
| default = [[Tinker III]]
}}</includeonly><noinclude>
[[Category:Templates]]
[[Category:Templates]]
You probably shouldn't be calling this unless you're writing a template.
You probably shouldn't be calling this unless you're writing a template.


Usage: <code><nowiki>{{Tinker check|4}}</nowiki></code>
Usage: <code><nowiki>{{Tinker check| 4 }}</nowiki></code>


Output:
Output:
{{Tinker check|4}}
{{Tinker check| 4 }}
</noinclude>
</noinclude>