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:CategoryVersion"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(allow non-versioned categories (e.g. parent categories))
(use same message for main namespace categories now)
 
(12 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
{{#vardefine:cv-ns|{{#rsplit:{{#var:cv-page}}|:|0}}}}{{
 
{{#vardefine:cv-ns|{{#rsplit:{{#var:cv-page}}|:|0}}}}{{
 
#vardefine:cv-cn|{{#rsplit:{{#var:cv-page}}|:|1}}
 
#vardefine:cv-cn|{{#rsplit:{{#var:cv-page}}|:|1}}
}}{{
+
}}{{#ifeq:{{#var:cv-cn}}|{{#var:cv-ns}}|{{#vardefine:cv-ns|parent}}}}{{
 
version links
 
version links
|theme={{#switch:{{lc:{{#var:cv-ns}}}}|{{lc:{{DF:Current}}}}=green|#default=orange}}
+
|theme={{#switch:{{lc:{{#var:cv-ns}}}}|{{lc:{{DF:Current}}}}|parent=green|#default=orange}}
 
|r1=
 
|r1=
[[{{#ifeq:{{#var:cv-ns}}|DF2014|*}}:Category:DF2014:{{#var:cv-cn}}|v{{current/version}}]]
+
[[{{#ifeq:{{#var:cv-ns}}||*}}:Category:{{#var:cv-cn}}|v{{current/version}}]]
[[{{#ifeq:{{#var:cv-ns}}|V0.34|*}}:Category:V0.34:{{#var:cv-cn}}|v0.34.11]]
+
[[{{#ifeq:{{#var:cv-ns}}|DF2014|*}}:Category:DF2014:{{#var:cv-cn}}|v{{#ifeq:{{#var:cv-ns}}|DF2014|0.47.05|0.47}}]]
[[{{#ifeq:{{#var:cv-ns}}|V0.31|*}}:Category:V0.31:{{#var:cv-cn}}|v0.31.25]]
+
[[{{#ifeq:{{#var:cv-ns}}|V0.34|*}}:Category:V0.34:{{#var:cv-cn}}|v{{#ifeq:{{#var:cv-ns}}|V0.34|0.34.11|0.34}}]]
[[{{#ifeq:{{#var:cv-ns}}|40d|*}}:Category:40d:{{#var:cv-cn}}|v0.28.181.40d]]
+
[[{{#ifeq:{{#var:cv-ns}}|V0.31|*}}:Category:V0.31:{{#var:cv-cn}}|v{{#ifeq:{{#var:cv-ns}}|V0.31|0.31.25|0.31}}]]
[[{{#ifeq:{{#var:cv-ns}}|23a|*}}:Category:23a:{{#var:cv-cn}}|v0.23.130.23a]]
+
[[{{#ifeq:{{#var:cv-ns}}|40d|*}}:Category:40d:{{#var:cv-cn}}|v{{#ifeq:{{#var:cv-ns}}|40d|0.28.181.40d|0.28}}]]
|bottom={{version links/link|Template:cv|More Info}}
+
[[{{#ifeq:{{#var:cv-ns}}|23a|*}}:Category:23a:{{#var:cv-cn}}|v{{#ifeq:{{#var:cv-ns}}|23a|0.23.130.23a|0.23}}]]
|center={{#switch:{{lc:{{#var:cv-ns}}}}|#default=This category is about an '''older version''' of DF.|template=This category is in the template namespace.|{{lc:{{df:current}}}}=This category is about the current version of DF.}}
+
|bottom={{version links/link|:Category:{{#var:cv-cn}}|Parent}}
}}[[Category:{{#var:cv-ns}}|{{#var:cv-cn}}]][[Category:{{#var:cv-cn}}|*{{version order|{{#var:cv-ns}}}}]]|<!-- errors -->
+
|center={{#switch:{{lc:{{#var:cv-ns}}}}|#default=This category contains pages about an '''older version''' of DF.|parent|{{lc:{{df:current}}}}=This category contains pages about the current version of DF.<br>This is a parent category.|template=This category is in the template namespace.}}
 +
}}{{#ifeq:{{#var:cv-ns}}|parent||[[Category:{{#var:cv-ns}}|{{#var:cv-cn}}]]}}[[Category:{{#var:cv-cn}}|*{{version order|{{#var:cv-ns}}}}]]|<!-- errors -->
 
<span class="error">This page is not in the Category namespace!</span>}}
 
<span class="error">This page is not in the Category namespace!</span>}}
 
</includeonly><noinclude>
 
</includeonly><noinclude>
{{docbox|Documentation|template:CategoryVersion/doc}}
+
{{documentation}}
{{CategoryVersion/doc}}
 
{{docbox-foot}}
 
 
[[category:Templates]]
 
[[category:Templates]]
 
+
[[category:Version templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 17:11, 13 July 2023

Shortcut:
template:cv