For consistency, we have adopted some templates originally created for Wikipedia, which allow the creation of charts, to be included on all station pages, showing the lines serving the station and the adjacent stations on each line.

Code to be placed in each station page

Each station should have the following code at the bottom:

If only one transit line serves the station:


If there is more than one transit system with service to the station, each one needs its own "s-rail" line (and "s-line" line); if there are multiple lines in one system, each gets an individual "s-line" line under the "s-rail" line for that system. An example is the code for 8th Street (SEPTA station), which contains the block of code:

{{s-line|system=SEPTA|line=Market-Frankford|previous=11th Street|next=5th Street}}
{{s-line|system=PATCO|line=Speedline|previous=9th-10th & Locust|next=City Hall}}

It will be noted that for XXXXXX, one puts an abbreviation for the transit system which runs the specific transit line, which will be used in naming the other necessary templates that need to be created.

Edits to be made to the "S-rail/lines" template

To make sure that a proper link is made to the page describing the transit system, you must edit the template Template:S-rail/lines to include the line


which will insert the link


in the heading of the succession box; this means the link will be displayed as BBBBBB but will link to the page [[AAAAAA]].

The "lines" template

To set up the line names in the box, it is necessary to have a template called [[Template:XXXXXX lines]]. This will enable the YYYYYY reference to link properly. It takes the form:


with one line of code for each transit line. The names AAAAAA, BBBBBB, etc. will be the values listed for YYYYYY in the "s-line" entry, while LLLLLL is the page linked to and MMMMMM the name displayed in the chart when YYYYYY ia AAAAAA, and so forth.

The two templates which list the ends of each transit line

For each line in the transit system, you will need to create two templates named [[Template:S-line/XXXXXX left/YYYYYY]] and [[Template:S-line/XXXXXX right/YYYYYY]]. These should contain, in standard form, the names of the termini in each direction. Thus Template:S-line/SEPTA left/Market-Frankford contains just 69th Street and Template:S-line/SEPTA right/Market-Frankford contains just Frankford as their entire content.

The station and color templates for the transit system

It will also be necessary to create two other templates named [[Template:XXXXXX stations]] and [[Template:XXXXXX color]].

The station template

This template, named [[Template:XXXXXX stations]], allows the system to create the link to the "previous station" and "next station" articles. In some cases, this will be as simple as

[[{{{station}}} (XXXXXX station)|{{{station}}}]]

(if all station pages are named [[ZZZZZZ (XXXXXX station)]]). In others, one will have to use a more complex format. The general format of this template is

 | #default=[[{{{station}}} (XXXXXX station)|{{{station}}}]]

(with as many lines of special data as necessary), which will convert ZZZZZZ or WWWWWW when they are specifically given in the "s-line" line as KKKKKK, NNNNNN, or RRRRRR to the links [[LLLLLL|MMMMMM]], [[PPPPPP|QQQQQQ]], and [[SSSSSS|TTTTTT]], while otherwise expanding the listing that way. (If you want an even more complex expansion of certain "ZZZZZZ" or "WWWWWW" items, you can put them in as well. See Template:MdTA stations.

The color template

This template is used to color-code the tabular lines for each transit line serving the station.

If there is only one transit line in the particular system symbolized as XXXXXX, the template named [[Template:XXXXXX color]] can be a simple file specifying the color as a 6-digit hexadecimal code RRGGBB, where RR designates the amount of red, GG the amount of green, and BB the amount of blue: pure red is FF0000, pure green 00FF00, pure blue 0000FF, and such. (any combination can be coded, so CC2647 will give this color for example.

Most transit systems have several lines, each of which is assigned a particular color on maps and such. You will need to try to determine a color for each line, and code the color in a file that will look like


where AAAAAA, BBBBBB, CCCCCC are the same line names used for the YYYYYY in the previously described code. Thus, [[Template:VREX color]] looks like this:

 | Manassas=0000FF
 | Fredericksburg=FF0000

to designate the Manassas line as blue and the Fredericksburg line as red.

When these files are all completed, the boxes will generally work. Special setups will, however, be needed for complex systems.

Community content is available under CC-BY-SA unless otherwise noted.