Difference between revisions of "Template:Amtrak web"

From blackwiki
Jump to navigation Jump to search
blackwiki>Daybeers
(added spaces for silver service / palmetto)
blackwiki>Daybeers
(-s for San Joaquin)
Line 33: Line 33:
 
     |Silver Meteor
 
     |Silver Meteor
 
     |Silver Star=*[https://www.amtrak.com/routes/silver-service-palmetto-train.html ''Silver Service / Palmetto'' – Amtrak]
 
     |Silver Star=*[https://www.amtrak.com/routes/silver-service-palmetto-train.html ''Silver Service / Palmetto'' – Amtrak]
     |San Joaquins=*[https://www.amtrak.com/routes/san-joaquins-train.html ''{{PAGENAMEBASE}}'' – Amtrak]
+
     |San Joaquin=*[https://www.amtrak.com/routes/san-joaquins-train.html ''{{PAGENAMEBASE}}'' – Amtrak]
 
     |Southwest Chief=*[https://www.amtrak.com/routes/southwest-chief-train.html ''{{PAGENAMEBASE}}'' – Amtrak]
 
     |Southwest Chief=*[https://www.amtrak.com/routes/southwest-chief-train.html ''{{PAGENAMEBASE}}'' – Amtrak]
 
     |Sunset Limited=*[https://www.amtrak.com/routes/sunset-limited-train.html ''{{PAGENAMEBASE}}'' – Amtrak]
 
     |Sunset Limited=*[https://www.amtrak.com/routes/sunset-limited-train.html ''{{PAGENAMEBASE}}'' – Amtrak]

Revision as of 02:53, 30 November 2018

Template documentation[view] [edit] [history] [purge]

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 Template:Station link. 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, {{amtrak web|PVD|Providence, RI}} 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, {{amtrak web|PVD}} displays Providence – Amtrak. What to display for oddballs like Union Stations is at the discretion of the editors of that particular page.

The route 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 yes. For example, putting {{amtrak web|route=yes}} on the California Zephyr page displays California Zephyr – Amtrak.