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
(re-add parent categories)
(allow non-versioned categories (e.g. parent categories))
Line 2: Line 2:
 
<!-- DO NOT edit this template unless you know very well what you are doing. This template is extremely easy to break. -->{{shortcut|template:cv}}</noinclude><includeonly>{{#vardefine:cv-page|{{PAGENAME}}}}{{
 
<!-- DO NOT edit this template unless you know very well what you are doing. This template is extremely easy to break. -->{{shortcut|template:cv}}</noinclude><includeonly>{{#vardefine:cv-page|{{PAGENAME}}}}{{
 
#ifeq:{{NAMESPACE}}|Category|
 
#ifeq:{{NAMESPACE}}|Category|
<!-- display -->{{#if:{{#rreplace:{{#var:cv-page}}|[^:]|}}|<!-- page name has : -->
+
<!-- display -->
 
{{#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}}
Line 17: Line 17:
 
|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.}}
 
|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.}}
 
}}[[Category:{{#var:cv-ns}}|{{#var:cv-cn}}]][[Category:{{#var:cv-cn}}|*{{version order|{{#var:cv-ns}}}}]]|<!-- errors -->
 
}}[[Category:{{#var:cv-ns}}|{{#var:cv-cn}}]][[Category:{{#var:cv-cn}}|*{{version order|{{#var:cv-ns}}}}]]|<!-- errors -->
<span class="error">Invalid category name! Name should be in format <tt>Category:''Namespace'':''Category Name''</tt>.</span>}}|
 
 
<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>

Revision as of 14:47, 8 April 2015

Shortcut:
template:cv


Documentation

A variation of {{ArticleVersion}} (or {{av}}) for category pages.