Difference between revisions of "Template:Metadata inherit"

From wiki.vg
Jump to navigation Jump to search
(Try to fix result without getting rid of all whitespace)
(I'm still not sure why it's adding a newline, but maybe this'll help.)
Line 6: Line 6:
 
     {{#if:{{{inherits|}}}
 
     {{#if:{{{inherits|}}}
 
         | {{#if:{{{pre_inherits|}}}
 
         | {{#if:{{{pre_inherits|}}}
             | Extends {{change|[[{{#varexists:meta_{{{inherits}}}|Entity metadata#|#}}{{{inherits}}}|{{{inherits}}}]]|[[{{#varexists:meta_{{{pre_inherits}}}|Entity metadata#|#}}{{{pre_inherits}}}|{{{pre_inherits}}}]]}}.
+
             | Extends {{change|[[{{#varexists:meta_{{{inherits}}}|Entity metadata}}#{{{inherits}}}|{{{inherits}}}]]|[[{{#varexists:meta_{{{pre_inherits}}}|Entity metadata}}#{{{pre_inherits}}}|{{{pre_inherits}}}]]}}.
             | Extends [[{{#varexists:meta_{{{inherits}}}|Entity metadata#|#}}{{{inherits}}}|{{{inherits}}}]].
+
             | Extends [[{{#varexists:meta_{{{inherits}}}|Entity metadata}}#{{{inherits}}}|{{{inherits}}}]].
 
         }}
 
         }}
 
         {{#if:{{{start_at|}}}
 
         {{#if:{{{start_at|}}}

Revision as of 03:24, 3 May 2019

Provides data for Template:Metadata id.

The first parameter is the name of the entity. The inherits parameter is the name of the entity it inherits from (which, for the root entity, is blank). The start_at variable indicates the starting ID (defaults to 0); it should not be used if the inherited entity is on the page (this is only useful for the root entity and on the pre-release page).

Behavior changes if meta_prerelease is defined; this template then supports optional pre_inherits and pre_start_at parameters, which should only be specified if the values changed. The template will also check if the entity has already been included on the page and decide whether to use a relative link or directly link to Entity metadata.