Difference between revisions of "Template:Codename"

From CRIU
Jump to: navigation, search
(added doc)
(fix to use string not numeric comparison in #switch, one more example to check it works fine)
Line 1: Line 1:
<includeonly>{{#switch: {{{1}}}
+
<includeonly>{{#switch: v{{{1}}}
  | 2.1  = Steel Lapwing
+
  | v2.1  = Steel Lapwing
  | 2.2  = Carbon Nightingale
+
  | v2.2  = Carbon Nightingale
  | 2.3  = Wooden Duck
+
  | v2.3  = Wooden Duck
  | 2.4  = Marble Lark
+
  | v2.4  = Marble Lark
  | 2.5  = Concrete Oriole
+
  | v2.5  = Concrete Oriole
  | 2.6  = Paper Crane
+
  | v2.6  = Paper Crane
  | 2.7  = Rubber Owl
+
  | v2.7  = Rubber Owl
  | 2.8  = Bronze Siskin
+
  | v2.8  = Bronze Siskin
  | 2.9  = Silk Tit
+
  | v2.9  = Silk Tit
  | 2.10 = Brass Waxwing
+
  | v2.10 = Brass Waxwing
 
  | <!-- no codename -->
 
  | <!-- no codename -->
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
Line 27: Line 27:
 
  | <pre><nowiki>{{Codename|2.10}}</nowiki></pre>
 
  | <pre><nowiki>{{Codename|2.10}}</nowiki></pre>
 
  | {{Codename|2.10}}
 
  | {{Codename|2.10}}
 +
|-
 +
| <pre><nowiki>{{Codename|2.1}}</nowiki></pre>
 +
| {{Codename|2.1}}
 
  |-
 
  |-
 
  | <pre><nowiki>{{Codename|2.0}}</nowiki></pre>
 
  | <pre><nowiki>{{Codename|2.0}}</nowiki></pre>

Revision as of 08:06, 26 January 2017


This template is used to get the codename of a specified release. If there is no codename, empty string is produced.

Usage

{{Codename|VERSION}}

Examples:

Markup Result
{{Codename|2.10}}
Brass Waxwing
{{Codename|2.1}}
Steel Lapwing
{{Codename|2.0}}