Template:InheritRef: Difference between revisions

From railML 2 Wiki
Jump to navigation Jump to search
[unchecked revision][unchecked revision]
(Documentation)
Line 11: Line 11:
**notes_de: A German comment
**notes_de: A German comment
===Dependencies===
===Dependencies===
The template depends on [[Template:Attr]] and [[Template:AddAnn]].
The template depends on [[Template:Attr]] and [[Template:AddAnn]]. About halve a dozen of other templates build on it, e.g. [[Template:InheritSwitchCrossing]].
 
==Examples==
==Examples==
<pre>{{InheritRef
<pre>{{InheritRef

Revision as of 18:47, 24 February 2016

Usage

This template displays an attribute with variable name and a standard comment. Optionally an English and a German comment can be added.

Arguments

The template has two obligatory and two optional arguments:

  • obligatory:
    • attributeName: An attribute
    • contextLink: An Element
  • optional:
    • notes_en: An English comment
    • notes_de: A German comment

Dependencies

The template depends on Template:Attr and Template:AddAnn. About halve a dozen of other templates build on it, e.g. Template:InheritSwitchCrossing.

Examples

{{InheritRef
|attributeName=Some Attribute Name
|contextLink=Some Name
}}

delivers

  • Some Attribute Name: This refers to the id attribute of the associated Some Name element.
{{InheritRef
|attributeName=Some Attribute Name
|contextLink=Some Name
|notes_en=An English comment
|notes_de=Ein deutscher Kommentar
}}

delivers

  • Some Attribute Name: This refers to the id attribute of the associated Some Name element.
    An English comment
    Ein deutscher Kommentar