Difference between revisions of "Template:Version switch/doc"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(fix)
(update)
 
Line 4: Line 4:
 
==Examples==
 
==Examples==
 
<pre>{{version switch|metals}}</pre>
 
<pre>{{version switch|metals}}</pre>
* When the template is included in the template namespace, a list of supported templates will be displayed (such as [[Template:DF2012 metals]], [[Template:v0.31 metals]], etc.).
+
* When the template is included in the template namespace, a list of supported templates will be displayed (such as [[Template:DF2014 metals]], [[Template:v0.34 metals]], etc.).
 
* When included from a supported namespace, the appropriate template for that namespace will be included (such as [[Template:40d metals]] when included on a 40d page).
 
* When included from a supported namespace, the appropriate template for that namespace will be included (such as [[Template:40d metals]] when included on a 40d page).
* When included in any other namespace, the template for the current version will be included ([[Template:DF2012 metals]] in this case).
+
* When included in any other namespace, the template for the current version will be included ([[Template:DF2014 metals]] in this case).

Latest revision as of 16:59, 18 May 2019

This template includes other templates based on the current page's namespace.

Usage[edit]

{{version switch|Base template name}}

Examples[edit]

{{version switch|metals}}
  • When the template is included in the template namespace, a list of supported templates will be displayed (such as Template:DF2014 metals, Template:v0.34 metals, etc.).
  • When included from a supported namespace, the appropriate template for that namespace will be included (such as Template:40d metals when included on a 40d page).
  • When included in any other namespace, the template for the current version will be included (Template:DF2014 metals in this case).