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.

Template:For-each-version

From Dwarf Fortress Wiki
Revision as of 03:19, 14 February 2023 by Lethosor (talk | contribs) (use explicit "Main" - otherwise, links in old versioned namespaces don't work due to the NamespaceLinks extension (Cat in the DF2014 namespace goes to DF2014:Cat))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


This template repeats a user-provided string once for each DF version era while substituting variables. In pseudocode:

  for each DF version era:
    replace $(ns) with the associated namespace, like "40d"
    replace $(version) with the associated version, like "0.28"
    if the selected-ns argument was provided, and selected-ns is equal to $(ns):
      replace $(selected-value) with the selected-value argument

For example, to list all versions and their namespaces, while highlighting v0.28 in particular, you can use

{{for-each-version|Version "v$(version)" has namespace "$(ns)" $(selected-value)<br>|selected-ns=40d|selected-value=<--selected--}}

Version "v50" has namespace "Main"
Version "v0.47" has namespace "DF2014"
Version "v0.34" has namespace "v0.34"
Version "v0.31" has namespace "v0.31"
Version "v0.28" has namespace "40d" <--selected--
Version "v0.23" has namespace "23a"