Template:Infobox Australian road/doc
![]() | This is a documentation subpage for Template:Infobox Australian road. It contains usage information, categories and other content that is not part of the original template page. |
![]() | This template uses Lua: |
![]() | This template employs intricate features of template syntax.
You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages. You can conduct experiments, and should test all major changes, in either this template's sandbox, the general template sandbox, or your user space before changing anything here. |
Usage
{{Infobox Australian road}} is the standard infobox used in Australian articles. Australian articles using {{Infobox road}} should be converted to use this infobox as it contains additional functionality, including that of {{Infobox street}} and {{Infobox road junction}}. Code exists for implementation of {{Infobox road small}} functionality if that is deemed to be necessary. See this discussion for more information.
To use this template
- Copy the relevant blank template from the Blank infobox template page into the beginning of your document, remembering to put the code at the very top of the article and the first word of the article on the very next line. For road junctions, use the reduced parameter set at Template:Infobox Australian road/Blank#Road junctions.
- Enter values for the parameters as outlined in the table below. Fields left blank will automatically be hidden.
- Preview.
- Save the page with an appropriate edit summary.
Examples
- Examples of this template can found on the examples page.
Parameters
All parameters used by this template are optional, except for |type=
. Some parameters require others to be completed in order to display data correctly. The following are available:
CollapseBasic setup parameters: | ||
---|---|---|
|
Source/notes | Values |
|
Required parameter. Sets up the template for a specific type of road or road junction. | "highway", "road", "rural road", "street", "expressway", "freeway", "motorway", "parkway", "track" or "junction" |
|
If the road is wholly contained within an urban area, set |urban=yes .
|
"yes" or empty |
|
Status of the road for use in limited circumstances. Only use when the road is under construction, proposed or has been closed. | Under construction: "uc" or "under construction" Proposed: "proposed" Closed: "closed" |
|
Primary name used for road | plain text, do not wikilink |
|
Alternative name(s) for road | plain text, do not wikilink. When there is more than one name, separate them with a solidus ( / ). If there are more than two names, use a bulleted list (which will display as a plain list). |
|
Use the 2 or 3 digit state code corresponding to the location used for direction_a and end_a . It will automatically be converted to the full state name and wikilinked. If the road passes through more than one state, use state2 for the "other end" of the road.
|
"qld", "nsw", "act", "vic", "tas", "sa", "wa", "nt" or "jbt". |
|
If the road passes through only one state, this parameter will not be used. When it is used, use the 2 or 3 digit state code corresponding to the location used for direction_b and end_b . It will automatically be converted to the full state name and wikilinked.
|
ExpandImage and map parameters: |
---|
ExpandGeneral information parameters: |
---|
ExpandJunction information parameters: (only use with type=junction )
|
---|
ExpandJunction list parameters: |
---|
ExpandLocation parameters: |
---|
ExpandHighway system parameters: |
---|
ExpandRestrictions parameters: |
---|
TemplateData
Expand TemplateData documentation used by VisualEditor and other tools
|
---|
Notes
Type
The infobox type affects the colour of the top bar of the infobox.
Colour[a] | |type=
|
---|---|
Snow Flurry (greenish) | highway |
Light Yellow | road, rural road |
Antique White | street |
Lavender | expressway, freeway, motorway, parkway |
Cape Honey (yellowish) | track |
Ghost White | junction |
Mauve | Undefined |
|status= , |uc_former=
| |
Grandis | under construction, uc, proposed |
Dark Grey | closed |
Calculating "image_upright"
The image_upright
parameter, and image2_upright
and logo_upright
where applicable, is/are provided so as to facilitate the use of scalable images in this infobox, in accordance with the instructions at WP:IMAGESIZE, which advises against the use of "px" (for example: thumb|300px
), as this forces a fixed image width.
Scalable images respect the user's base preference, which may have been selected for that user's particular devices. Module:InfoboxImage, which is used in this infobox, accommodates the use of scaling. However, setting the appropriate scale is slightly more complex than setting a raw "px" value. This guide provides a quick conversion table to make the process of setting a scale easier. It is based on a default thumbnail setting of 220px.
170px
→upright=0.75
180px
→upright=0.8
190px
→upright=0.85
200px
→upright=0.9
210px
→upright=0.95
220px
→upright=1
230px
→upright=1.05
240px
→upright=1.1
250px
→upright=1.15
260px
→upright=1.2
270px
→upright=1.23
280px
→upright=1.25
290px
→upright=1.3
300px
→upright=1.35
"Ref" fields
Any references should be placed within the respective "_ref" parameter's field and not within the field reserved solely for a numeric value. For example, place the reference used for the length of the road in the {{{length_ref}}} and not in the {{{length}}} parameter. Otherwise, an error may result.
Unformatted numbers and expression errors
Certain parameters require numeric values to be entered in an unformatted/raw fashion—i.e. 1000.0 NOT 1,000.0. If an expression error is present, simply remove any commas or spaces from the number.
Tracking categories
- Articles that include deprecated parameters are automatically added to Category:Pages using infobox Australian road with deprecated parameters (0).
- Articles that use unknown parameters (e.g. typos) are automatically added to Category:Pages using infobox Australian road with unknown parameters (0).
- Category:Pages using infobox Australian road with coordinates for only one end point (0)
- Category:Pages using infobox Australian road with an implicitly suppressed location map (0)
- Category:Infobox Australian road articles with an infobox mapframe map (0)
Subpages
Microformat
The HTML markup produced by this template includes an hCard microformat, which makes the place-name and location parsable by computers, either acting automatically to catalogue articles across Wikipedia, or via a browser tool operated by a person, to (for example) add the subject to an address book. Within the hCard is a Geo microformat, which additionally makes the coordinates (latitude & longitude) parsable, so that they can be, say, looked up on a map, or downloaded to a GPS unit. For more information about the use of microformats on Wikipedia, please see the microformat project.
Sub-templates
If the place or venue has "established", "founded", "opened" or similar dates, use {{start date}} for the earliest of those dates unless the date is before 1583 CE.
If it has a URL, use {{URL}}.
Please do not remove instances of these sub-templates.
Classes
hCard uses HTML classes including:
- adr
- agent
- category
- county-name
- extended-address
- fn
- label
- locality
- nickname
- note
- org
- region
- street-address
- uid
- url
- vcard
Geo is produced by calling {{coord}}, and uses HTML classes:
- geo
- latitude
- longitude
Please do not rename or remove these classes nor collapse nested elements which use them.
Precision
When giving coordinates, please use an appropriate level of precision. Do not use {{coord}}'s |name=
parameter.