Template:METRORail
| This template employs intricate features of template syntax.
You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages. You can conduct experiments, and should test all major changes, in either this template's sandbox, the general template sandbox, or your user space before changing anything here. |
Contents
How to use
Normal station
Here is how you employ this template with a normal station (one with another station in either direction):
{{METRORail
|line=red
|this=Main Street Square Station
|prev=Bell Station
|next=Preston Station
}}
which creates the following:
}}
| ← (SOUTH) | METRORail Red Line | (NORTH) → |
| Bell Station | Main Street Square Station | Preston Station |
Termini
If you do not define a next or previous station, the template will display "TERMINUS" like so:
{{METRORail
|line=red
|this=Fannin South Station
|next=Reliant Park Station
}}
which creates the following:
}}
| TERMINUS | METRORail Red Line | (NORTH) → |
| None | Fannin South Station | Reliant Park Station |
How this template handles user error
{{METRORail
|this=Fannin South Station
}}
The template renders without all the information it could, like so:
There appears to be an error in the way this template was coded. There is no line defined (}}
There appears to be an error in the way this template was coded. There is no previous station defined (
TERMINUS
METRORail
TERMINUS
None
Fannin South Station
None
Extensibility
The template knows that the METRORail Red Line goes in a north and south direction. If and when a new line is created, this template can be used for it. All that needs to be done is a simple addition to define the previous station direction (in this case south) and the next station direction (in this case north) and the color of text that should be used to display the name of the line (in this case, red).
If this arises and you do not feel comfortable editing the code, please contact Drumguy8800.