This is the template sandbox page for Template:PTV route (diff). |
This template uses Lua: |
This template produces external links to route pages on Public Transport Victoria's website.
If you need to cite a bus route web page, please use {{cite PTV route}} instead.
Usage
edit{{PTV route|<route number>|mode=<mode of transportation>|display=<display code>|text=<custom display text>}}
Parameters
edit- route - the route number of the route you wish to link to. This parameter is required, but you can use the first positional parameter instead;
{{PTV route|123}}
has the same result as{{PTV route|route=123}}
. - mode - the mode of transport for the route you wish to link to. Use
bus
to link to a bus route, ortram
to link to a tram route. This parameter is optional, and if no value is supplied the template will attempt to link to a bus route by default. - display - the code for the link text you want to display. Use
num
ornumber
to display the route number, ordesc
ordescription
to display a short description of the route. By default, no link text is displayed. - text - Custom link text to display, if the
|display=
parameter is not used.
Deprecated parameters
editThese parameters may be removed in a future version of the template.
- numtext - if not empty, link text will be the number of the route (e.g.; "737"). Leave blank otherwise.
- deftext - if not empty, link text will be the title of the route (e.g.; "Caroline Springs - Albion"). Leave blank otherwise.
Pages with templates using either of these parameters are put in Category:PTV route templates with deprecated parameters.
Examples
editCode | Result |
---|---|
{{PTV route|route=735}}
|
[1] |
{{PTV route|route=5|mode=tram}}
|
[2] |
{{PTV route|route=735|display=num}}
|
735 |
{{PTV route|route=735|display=desc}}
|
Box Hill to Nunawading |
{{PTV route|route=735|text=a bus route}}
|
a bus route |
Updating routes
editTo edit the route data, please go to Module:PTV route/data.
Tracking categories
editThis template uses the following tracking categories:
- Category:PTV route templates with deprecated parameters - for transclusions using deprecated parameters.
- Category:PTV route templates with invalid routes - for transclusions that specify a combination of
|route=
and|mode=
that does not exist in Module:PTV route/data.