Difference between revisions of "Template:Amtrak web"

From blackwiki
Jump to navigation Jump to search
blackwiki>Michael Bednarek
(restore categories.)
blackwiki>Daybeers
(added rest of routes, will change the articles later)
Line 2: Line 2:
 
  |yes={{#switch:{{PAGENAMEBASE}}
 
  |yes={{#switch:{{PAGENAMEBASE}}
 
     |Acela Express=*[https://www.amtrak.com/routes/acela-express-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 
     |Acela Express=*[https://www.amtrak.com/routes/acela-express-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 +
    |Amtrak Cascades=*[https://www.amtrak.com/routes/cascades-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 +
    |Auto Train=*[https://www.amtrak.com/routes/auto-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 +
    |Blue Water
 +
    |Pere Marquette
 +
    |Wolverine=*[https://www.amtrak.com/routes/michigan-services-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 +
    |California Zephyr=*[https://www.amtrak.com/routes/california-zephyr-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 +
    |Capitol Corridor=*[https://www.amtrak.com/routes/capitol-corridor-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 +
    |Capitol Limited=*[https://www.amtrak.com/routes/capitol-limited-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 +
    |Carolinian
 +
    |Piedmont=*[https://www.amtrak.com/routes/carolinian-piedmont-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 +
    |City of New Orleans=*[https://www.amtrak.com/routes/city-of-new-orleans-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 +
    |Coast Starlight=*[https://www.amtrak.com/routes/coast-starlight-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 +
    |Empire Builder=*[https://www.amtrak.com/routes/empire-builder-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 +
    |Empire Service=*[https://www.amtrak.com/routes/empire-service-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 +
    |Ethan Allen Express=*[https://www.amtrak.com/routes/ethan-allen-express-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 +
    |Heartland Flyer=*[https://www.amtrak.com/routes/heartland-flyer-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 +
    |Hoosier State=*[https://www.amtrak.com/routes/hoosier-state-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 +
    |Illinois Zephyr and Carl Sandburg
 +
    |Illini and Saluki
 +
    |Lincoln Service=*[https://www.amtrak.com/routes/illinois-services-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 +
    |Keystone Service=*[https://www.amtrak.com/routes/keystone-service-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 
     |Lake Shore Limited=*[https://www.amtrak.com/routes/lake-shore-limited-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 
     |Lake Shore Limited=*[https://www.amtrak.com/routes/lake-shore-limited-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 +
    |Maple Leaf=*[https://www.amtrak.com/routes/maple-leaf-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 +
    |Missouri River Runner=*[https://www.amtrak.com/routes/missouri-river-runner-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 +
    |Northeast Regional=*[https://www.amtrak.com/routes/northeast-regional-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 +
    |Pacific Surfliner=*[https://www.amtrak.com/routes/pacific-surfliner-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 +
    |Palmetto
 +
    |Silver Meteor
 +
    |Silver Star=*[https://www.amtrak.com/routes/silver-service-palmetto-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 +
    |San Joaquins=*[https://www.amtrak.com/routes/san-joaquins-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 +
    |Southwest Chief=*[https://www.amtrak.com/routes/southwest-chief-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 
     |Sunset Limited=*[https://www.amtrak.com/routes/sunset-limited-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 
     |Sunset Limited=*[https://www.amtrak.com/routes/sunset-limited-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 
     |Texas Eagle=*[https://www.amtrak.com/routes/texas-eagle-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]
 
     |Texas Eagle=*[https://www.amtrak.com/routes/texas-eagle-train.html {{{1|''{{PAGENAMEBASE}}''}}} – Amtrak]

Revision as of 09:54, 28 November 2018

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.