Module:Adjacent stations/doc: Difference between revisions

Content deleted Content added
No edit summary
Line 110:
|-
|<code>["station format"]</code>
|Table or string
|{{Yes}}
|Data tableTable containing station format strings. The first entry without a specified key (i.e. with the key being the number <code>1</code>) is the default, and all other entries must have keys corresponding to the input. Format strings without squarewikilink brackets are converted to links, with the input (usually the station name) used as the displayed text. Tables can be nested within this table to indicate options based on the line and line type passed to this template; nested tables can also have a default in the same way.

<code>%1</code>, <code>%2</code> and <code>%3</code> can be used in all strings regardless of the level of nesting to be replaced respectively by the station input, the line input (after alias replacement) and the type input (after alias replacement).
|-
|<code>["lines"]</code>
Line 122 ⟶ 124:
|Table
|{{Yes}}
|Table containing aliases (as table keys) for lines (as values). All keys are lowercase, as the input is treated as case-insensitive by being lowercasedlower-cased.
|}
 
=== Station format table (2) ===
{| class="wikitable"
|+
!Parameter
!Type
!Used in {{Tl|Adjacent stations}}
!Description
|-
|<code>[1]</code>
|String
|{{Yes}}
|Default format.
|-
|<code>["''non-default station name''"]</code>
|String or table
|{{Yes}}
|Format for a non-default station, or line-specific format table.
|}
 
=== Line-specific format table (3) ===
{| class="wikitable"
|+
!Parameter
!Type
!Used in {{Tl|Adjacent stations}}
!Description
|-
|<code>[1]</code>
|String
|{{Yes}}
|Default format.
|-
|<code>["''line name''"]</code>
|String or table
|{{Yes}}
|Format for a non-default station, or type-specific format table.
|}
 
=== Type-specific format table (4) ===
{| class="wikitable"
|+
!Parameter
!Type
!Used in {{Tl|Adjacent stations}}
!Description
|-
|<code>[1]</code>
|String
|{{Yes}}
|Default format.
|-
|<code>["''type name''"]</code>
|String
|{{Yes}}
|Format for a non-default station.
|}