模板:Infobox road/old/doc

This is the basic syntax you need to get a complete routebox on the article page, just place this before any other text and fill in the variables. Note that this is a complete list of every variable that can be used with Infobox road and that many are unnecessary in most cases. Variables that are empty can be omitted.

注意:英文维基百科的Template:Infobox road与本模板有一些差异,复制英文维基百科条目内的Infobox road内容至中文维基百科时可能需要修改以避免显示错误。(注:{{Infobox road2}}支援新版英文维基的要素,只需要在模板名称后面加上2即可使用。

{{Infobox road
|marker_image=
|state=
|highway_name=
|name_notes=
|type=
|route=
|alternate_name=
|maint=
|section=
|map=
|length_mi=
|length_round=
|length_ref=
|length_notes=
|established=
|decommissioned=
|direction_a=
|terminus_a=
|beltway_city=
|junction=
|direction_b=
|terminus_b=
|counties=
|rural_municipalities=
|cities=
|system=
|previous_type=
|previous_route=
|next_type=
|next_route=
|browse=
|commons=
|customcommons=
}}

参数说明

政区

Three parameters exist for supplying the political entity that the road is located in. Only one may be used on a given article, preferably the most applicable of the three.

Parameter What it takes Suggested usage
state The two-letter abbreviation of the state that the article route is located in U.S. roads
province The two-letter abbreviation of the province that the article route is located in Canadian roads
country Full name of the country that the article route is located in International roads

Shields and highway names

If no political entity is specified, two parameters may be used to add a shield and the highway name. If a political entity is specified, there is no need to use these parameters except to overwrite the text generated by the political entity, "type" and "route".

  • marker_File: shield image to be displayed
  • highway_name: road name to be displayed, usually the number of the road (example: "New York State Route 5").

长度

Multiple scenarios for lengths have been detailed below.

  • 使用length指明“总长度”;或
  • 使用length_milength_km指明“总长度”,可仅指明length_milength_km两者之一的数值。
  • length_ref, if defined, appears after the first length. Use a citation for the length or {{fact}} here. Be sure that the first length is the one for which you have a reference.
  • length_notes, if defined, appears as a note below the length. This can be used to show former length, or future length, etc.

General content

  • name_notes: foot notes that will be displayed in small text underneath the highway name
  • type: usually the two-letter state abbreviation for state roads; see the state WikiProject for more details
  • route: This is the number of the route the article is about (used only with a political entity)
  • alternate_name: Use in situations where the entire route has another name (i.e. NY 590 is called the Sea Breeze Expressway for its entire length)
  • maint: 负责维护本公路的单位
  • section The section of code that defines this route. Only CA and WA use this, and the appropriate subpage ([[/CA law]] for example) must be set up.
  • map: 用法是 map = Filename.jpg 之类。Image name of a map for the route, width should be 250px; see the maps task force for maps; set map_custom=yes(此项在中文维基百科暂时无效) for a nonstandard map
  • map2: 暂时代替map_custom,用法是 map2 = [[File:Filename.jpg|width]] 之类。
  • established: This is the date the route was commissioned or assigned to its current alignment
  • decommissioned: date the route was decommissioned
  • direction_a: 如为美国道路,本处应为“南向”或“西向”以便与 the U.S. Roads project保持一致;该计画是将公路终点与交会处由西向东以及由南向北标注的。.
  • starting_terminus: This is where the route begins and, for U.S. roads, is either at the southern terminus or western terminus.
  • beltway_city: for beltways. This is the city that the beltway encircles
  • junction: 列出主要交汇处。Each WikiProject has different standards for major junctions, so consult the relevant WikiProject for more details.
  • direction_b: The opposite of direction_a
  • ending_terminus: where the route ends, in accordance with the guidelines set forth with starting_terminus
  • counties: a list of 县 that the route enters
  • rural_municipalities: a list of rural municipalities that the route enters (specific to Manitoba and Saskatchewan)
  • cities: a list of 城市 that the route enters
  • system: the highway system that the article route is part of
  • previous_type: This is the type of route that proceeds the current one in the system. For U.S. roads, the value for this is: Interstate, US, or (State) for Interstates, U.S. Routes and other state roads, respectively. Each state has a different parameter for state roads, so consult the WikiProject if in doubt.
  • previous_route: The number of the route preceding this one
  • next_type: Same as previous_type but for the route following this one
  • next_route: The number of the route succeeding this one
  • browse: use to add additional browse lines
  • commons: use to add link to image gallery or category in commons, input should be gallery, category, or left blank
  • customcommons: (use with commons) use to specify a different gallery/category than the default that is linked