Template:Busbox: Difference between revisions
imported>ScottN fix <noinclude> |
imported>ScottN No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 4: | Line 4: | ||
|- | |- | ||
| {{{number}}} {{{name}}} | | {{{number}}} {{{name}}} | ||
| [http://www.translink.ca/~/media/ | | [http://www.translink.ca/~/media/Route_Files/78/routemap/r{{{number}}}.ashx map] | ||
| [http://www.translink.ca/~/media/ | | [http://www.translink.ca/~/media/Route_Files/78/timetables/tt{{{number}}}.ashx schedule] | ||
|- | |- | ||
{{#if:{{{name2|}}}| | {{#if:{{{name2|}}}| | ||
{{!}} {{{number2}}} {{{name2}}} | {{!}} {{{number2}}} {{{name2}}} | ||
{{!}} [http://www.translink.ca/~/media/ | {{!}} [http://www.translink.ca/~/media/Route_Files/78/routemap/r{{{number2}}}.ashx map] | ||
{{!}} [http://www.translink.ca/~/media/ | {{!}} [http://www.translink.ca/~/media/Route_Files/78/timetables/tt{{{number2}}}.ashx schedule] | ||
{{!}}- | {{!}}- | ||
}} | }} | ||
{{#if:{{{name3|}}}| | {{#if:{{{name3|}}}| | ||
{{!}} {{{number3}}} {{{name3}}} | {{!}} {{{number3}}} {{{name3}}} | ||
{{!}} [http://www.translink.ca/~/media/ | {{!}} [http://www.translink.ca/~/media/Route_Files/78/routemap/r{{{number3}}}.ashx map] | ||
{{!}} [http://www.translink.ca/~/media/ | {{!}} [http://www.translink.ca/~/media/Route_Files/78/timetables/tt{{{number3}}}.ashx schedule] | ||
{{!}}- | {{!}}- | ||
}} | }} | ||
|} | |} | ||
<noinclude> | <noinclude> | ||
The links in the template need to be periodcally updated every time translink changes their | This template should be used for linking to translink bus routes and schedules on their website. Using a template protects use in case the location of these files ever changes. In that case, we would only have to update the template, and not all the pages that use the template. | ||
==Usage== | |||
{{Busbox|number=007|name=Dunbar|number2=C12|name2=Lions Bay}} | |||
The template uses named parameters for the bus route number and bus route name. Currently the template is limited to a maximum of 3 bus routes. The parameter names are "name", "number", "name2", "number2", "name3", "number3", etc. See the example below to link to the #7 and C12 bus routes. This generates the box show at right: | |||
<nowiki>{{Busbox|number=001|name=TBD|number2=C12|name2=Lions Bay}}</nowiki> | |||
Note that you must pad the bus route number to 3 digits in order to get it to work. For community shuttle bus routes, the number must start with the character C followed by 2 digits only. | |||
==Updates== | |||
The links in the template need to be periodcally updated every time translink changes their schedule, as the URLs to the bus maps and timtables change. | |||
</noinclude> | </noinclude> | ||
Latest revision as of 15:45, 22 June 2012
| Translink Bus Information | ||
| {{{number}}} {{{name}}} | map | schedule |
This template should be used for linking to translink bus routes and schedules on their website. Using a template protects use in case the location of these files ever changes. In that case, we would only have to update the template, and not all the pages that use the template.
Usage
| Translink Bus Information | ||
| 007 Dunbar | map | schedule |
| C12 Lions Bay | map | schedule |
The template uses named parameters for the bus route number and bus route name. Currently the template is limited to a maximum of 3 bus routes. The parameter names are "name", "number", "name2", "number2", "name3", "number3", etc. See the example below to link to the #7 and C12 bus routes. This generates the box show at right:
{{Busbox|number=001|name=TBD|number2=C12|name2=Lions Bay}}
Note that you must pad the bus route number to 3 digits in order to get it to work. For community shuttle bus routes, the number must start with the character C followed by 2 digits only.
Updates
The links in the template need to be periodcally updated every time translink changes their schedule, as the URLs to the bus maps and timtables change.