Template:Exists

From RailTopoModel® Wiki
Jump to navigation Jump to search

Template to check if an element exists in a certain version. If yes, the Syntax will be displayed. Otherwise a notice will appear.

The template employs Template:Duplicate to return the location of automatically generated content for the respective element in the respective version and transcludes it. If there is no such content, an alternative text will appear.

This template is designed to serve template:robot.

Example

{{exists|subschema=RS|element=owner|version=3.1}}

delivers:


This element does not appear in railML® 3.1 within the RS subschema. It is available only in railML® . Do not hesitate to contact railML.org e.V. for further questions.

(Which is an alternative text, as RS:owner/3.1 is empty)

{{exists|subschema=RS|element=owner|version=3.2}}

delivers:


This element does not appear in railML® 3.2 within the RS subschema. It is available only in railML® . Do not hesitate to contact railML.org e.V. for further questions.

(Which is the transclusion of RS:owner/3.2)railml2:Template:Existsrailml3:Template:Exists