Template:Amtrak web/doc

Usage
This template provides a simple way to link to the official Amtrak station and route pages. The default usage is for stations, with the first unnamed parameter being the station code, ex. PVD for. The template uses this to create the link to the Amtrak page, in this case https://www.amtrak.com/stations/pvd. Case doesn't matter for this, as the template automatically converts the value to lowercase. In order to get the template to display in a "city/town, state" format, a second parameter needs to be defined with the text to display. For example,  displays Providence, RI – Amtrak. Otherwise, the template will take the base of the article title (meaning without any disambiguation) and remove the last word, normally "station", and then display the output. For example,  displays Providence – Amtrak. What to display for oddballs like Union Stations is at the discretion of the editors of that particular page.

The  parameter allows this template to also be used for route pages, ex. https://www.amtrak.com/routes/california-zephyr-train.html. The only value for this parameter is. For example, putting  on the  page displays California Zephyr – Amtrak.

{	"params": { "route": { "label": "Is this a route page?", "description": "Enter \"yes\" if this is a route page?", "example": "yes or leave blank" },		"1": {			"label": "Station code", "description": "Enter the three letter station code assigned by Amtrak.", "example": "WAS", "required": true },		"2": {			"label": "Display name", "description": "How should the page name be displayed? Defaults to the page name minus the last word.", "example": "Washington, DC" }	},	"description": "This template provides a simple way to link to the official Amtrak station and route pages. ", "paramOrder": [ "1",		"2",		"route" ],	"format": "block" }