Difference between revisions of "Template:Amtrak web"
blackwiki>Daybeers (-s for San Joaquin) |
blackwiki>Daybeers (removed asterisks for bullet list) |
||
| Line 1: | Line 1: | ||
{{#switch:{{{route}}} | {{#switch:{{{route}}} | ||
|yes={{#switch:{{PAGENAMEBASE}} | |yes={{#switch:{{PAGENAMEBASE}} | ||
| − | |Acela Express= | + | |Acela Express=[https://www.amtrak.com/routes/acela-express-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
| − | |Amtrak Cascades= | + | |Amtrak Cascades=[https://www.amtrak.com/routes/cascades-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
| − | |Auto Train= | + | |Auto Train=[https://www.amtrak.com/routes/auto-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
|Blue Water | |Blue Water | ||
|Pere Marquette | |Pere Marquette | ||
| − | |Wolverine= | + | |Wolverine=[https://www.amtrak.com/routes/michigan-services-train.html ''Michigan Services'' – Amtrak] |
| − | |California Zephyr= | + | |California Zephyr=[https://www.amtrak.com/routes/california-zephyr-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
| − | |Capitol Corridor= | + | |Capitol Corridor=[https://www.amtrak.com/routes/capitol-corridor-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
| − | |Capitol Limited= | + | |Capitol Limited=[https://www.amtrak.com/routes/capitol-limited-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
|Carolinian | |Carolinian | ||
| − | |Piedmont= | + | |Piedmont=[https://www.amtrak.com/routes/carolinian-piedmont-train.html ''Carolinian & Piedmont'' – Amtrak] |
| − | |City of New Orleans= | + | |City of New Orleans=[https://www.amtrak.com/routes/city-of-new-orleans-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
| − | |Coast Starlight= | + | |Coast Starlight=[https://www.amtrak.com/routes/coast-starlight-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
| − | |Empire Builder= | + | |Empire Builder=[https://www.amtrak.com/routes/empire-builder-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
| − | |Empire Service= | + | |Empire Service=[https://www.amtrak.com/routes/empire-service-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
| − | |Ethan Allen Express= | + | |Ethan Allen Express=[https://www.amtrak.com/routes/ethan-allen-express-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
| − | |Heartland Flyer= | + | |Heartland Flyer=[https://www.amtrak.com/routes/heartland-flyer-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
| − | |Hiawatha Service= | + | |Hiawatha Service=[https://www.amtrak.com/routes/hiawatha-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
| − | |Hoosier State= | + | |Hoosier State=[https://www.amtrak.com/routes/hoosier-state-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
|Illinois Zephyr and Carl Sandburg | |Illinois Zephyr and Carl Sandburg | ||
|Illini and Saluki | |Illini and Saluki | ||
| − | |Lincoln Service= | + | |Lincoln Service=[https://www.amtrak.com/routes/illinois-services-train.html ''Illinois Services'' – Amtrak] |
| − | |Keystone Service= | + | |Keystone Service=[https://www.amtrak.com/routes/keystone-service-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
| − | |Lake Shore Limited= | + | |Lake Shore Limited=[https://www.amtrak.com/routes/lake-shore-limited-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
| − | |Maple Leaf= | + | |Maple Leaf=[https://www.amtrak.com/routes/maple-leaf-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
| − | |Missouri River Runner= | + | |Missouri River Runner=[https://www.amtrak.com/routes/missouri-river-runner-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
|New Haven–Springfield Shuttle | |New Haven–Springfield Shuttle | ||
| − | |Northeast Regional= | + | |Northeast Regional=[https://www.amtrak.com/routes/northeast-regional-train.html ''Northeast Regional'' – Amtrak] |
| − | |Pacific Surfliner= | + | |Pacific Surfliner=[https://www.amtrak.com/routes/pacific-surfliner-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
|Palmetto | |Palmetto | ||
|Silver Meteor | |Silver Meteor | ||
| − | |Silver Star= | + | |Silver Star=[https://www.amtrak.com/routes/silver-service-palmetto-train.html ''Silver Service / Palmetto'' – Amtrak] |
| − | |San Joaquin= | + | |San Joaquin=[https://www.amtrak.com/routes/san-joaquins-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
| − | |Southwest Chief= | + | |Southwest Chief=[https://www.amtrak.com/routes/southwest-chief-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
| − | |Sunset Limited= | + | |Sunset Limited=[https://www.amtrak.com/routes/sunset-limited-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
| − | |Texas Eagle= | + | |Texas Eagle=[https://www.amtrak.com/routes/texas-eagle-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
| − | |#default= | + | |#default=[https://www.amtrak.com/routes/{{lc:{{PAGENAMEBASE}}}}-train.html ''{{PAGENAMEBASE}}'' – Amtrak] |
}} | }} | ||
| − | |#default= | + | |#default=[https://www.amtrak.com/stations/{{lc:{{{1}}}}} {{{2|{{remove last word|{{PAGENAMEBASE}}}}}}} – Amtrak] |
}}<noinclude> | }}<noinclude> | ||
{{documentation}} | {{documentation}} | ||
Revision as of 02:57, 30 November 2018
Template:Remove last word – Amtrak
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.
| The above documentation is transcluded from Template:Amtrak web/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |