How to use edit

Normal station edit

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 edit

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 edit

{{METRORail
|this=Fannin South Station
}}

It lets you know when you screw up, like so:



There appears to be an error in the way this template was coded.
    There is no line defined (|line=). Without one, the template cannot know which direction the next stations are. Please fix.
There appears to be an error in the way this template was coded.
     There is no previous station defined (|prev=) and no next station defined (|next=). If only a previous station or only a next station defined, the template renders the absent station as a terminus. However, it is highly irregular and highly improbable that there is only one station on a rail line. Please fix.
{| style="border: 1px solid #CCCCCC; width: 550px; padding:4px;" align="center" cellspacing="0" cellpadding="4px" |- | style="text-align: left; background-color: #f3f3f3;" | TERMINUS | style="text-align: center; background-color: #f3f3f3;" |METRORail | style="text-align: right; background-color: #f3f3f3;" |TERMINUS |- | style="width: 30%; text-align: left;" | None | style="width: 40%; text-align: center;" | Fannin South Station | style="width: 30%; text-align: right;" | None |}

Extensibility edit

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.