v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "Template:Ns-name"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(Created page with "{{#switch:{{ns-rel-id|{{{1}}}}} |1=23a |2=40d |3=v0.31 |4=v0.34 |5=DF2014 }}<noinclude> Returns a namespace ID given a major version ID (opposite of {{tl|ns-rel-id}}) <nowiki...")
 
(+example)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#switch:{{ns-rel-id|{{{1}}}}}
+
{{#invoke:versions/parserFunctions|getNamespaceByIndex|{{{id|{{ns-rel-id|{{{1}}}}}}}}|}}<noinclude>
|1=23a
+
* When given an unnamed parameter, returns a normalized namespace name
|2=40d
+
* When given an ``id`` parameter, acts as the opposite of {{tl|ns-rel-id}}
|3=v0.31
 
|4=v0.34
 
|5=DF2014
 
}}<noinclude>
 
Returns a namespace ID given a major version ID (opposite of {{tl|ns-rel-id}})
 
  
<nowiki>{{ns-name|1}}</nowiki> &rarr; {{ns-name|1}}
+
<nowiki>{{ns-name|DF2012}}</nowiki> &rarr; {{ns-name|DF2012}}
 +
 
 +
<nowiki>{{ns-name|id=1}}</nowiki> &rarr; {{ns-name|id=1}}
 +
 
 +
<nowiki>{{ns-name|unknown}}</nowiki> &rarr; {{ns-name|unknown}}
 +
 
 +
[[Category:Version templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 23:35, 27 November 2022

Main

  • When given an unnamed parameter, returns a normalized namespace name
  • When given an id parameter, acts as the opposite of {{ns-rel-id}}

{{ns-name|DF2012}} → v0.34

{{ns-name|id=1}} → 23a

{{ns-name|unknown}} → Main