Template:Tinker check: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
(default case doesn't need 'default=')
(remove auto linking, move to item template)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#switch: {{{1}}}
<includeonly>{{#switch: {{{1}}}
| A
| B
| C
| D
  | 0
  | 0
  | 1
  | 1
  | 2
  | 2
  | 3 = [[Tinker I]]
  | 3 = Tinker I
  | 4
  | 4
  | 5
  | 5
  | 6 = [[Tinker II]]
  | 6 = Tinker II
  | [[Tinker III]]
  | 7
| 8
| 9 = Tinker III
| #default = ?[[Category:Pages with Tinker check Template errors]]
}}</includeonly><noinclude>
}}</includeonly><noinclude>
[[Category:Templates]]
[[Category:Templates]]
Line 16: Line 23:
Output:
Output:
{{Tinker check| 4 }}
{{Tinker check| 4 }}
If an invalid value (not 0-9) is sent to this template, it returns a '''Tinker ?''' link and applies the [[:Category:Pages with Tinker check Template errors]] category.
</noinclude>
</noinclude>

Latest revision as of 22:59, 22 January 2020

You probably shouldn't be calling this unless you're writing a template.

Usage: {{Tinker check| 4 }}

Output: Tinker II

If an invalid value (not 0-9) is sent to this template, it returns a Tinker ? link and applies the Category:Pages with Tinker check Template errors category.