Difference between revisions of "Template:Metadata id"

From wiki.vg
Jump to navigation Jump to search
(OK, let's try it like this instead)
(Try to eliminate <p> tag - hopefully I don't need to get rid of all the whitespace)
Line 1: Line 1:
<includeonly>
+
<includeonly>{{#if:{{#var:meta_prerelease}}|<!-- Prerelease mode -->
{{#if:{{#var:meta_prerelease}}|<!-- Prerelease mode -->
 
 
     {{#vardefine:cur_meta|{{#var:meta_{{#var:meta_current_entity}}}}}}
 
     {{#vardefine:cur_meta|{{#var:meta_{{#var:meta_current_entity}}}}}}
 
     {{#vardefine:pre_meta|{{#var:meta_pre_{{#var:meta_current_entity}}}}}}
 
     {{#vardefine:pre_meta|{{#var:meta_pre_{{#var:meta_current_entity}}}}}}

Revision as of 03:18, 3 May 2019

Used to generate incremental entity metadata IDs.

cur_meta and pre_meta are local variables, to avoid redundancy. meta_current_entity is defined elsewhere, and meta_entity and meta_pre_entity are accessed via it. Those two values are incremented after this template.

Behavior changes if a meta_prerelease variable is defined: the template supports an optional parameter which may be set to blank, added, or removed, which can be used to mark metadata entries that were added or removed in the prerelease.