Jump to content

Template:Infobox trail/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
update doc
 
(30 intermediate revisions by 14 users not shown)
Line 2: Line 2:
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->


{{Template other|{{Notice|Please note this documentation is also included in [[Wikipedia:WikiProject Hiking Trails]].}}|}}
{{Template other
| {{Notice|Please note this documentation is also included in [[Wikipedia:WikiProject Hiking Trails]].}}
{{Lua|Module:Infobox|Module:InfoboxImage|Module:Check for unknown parameters}}
This template is
| {{tl|Infobox trail}} is the primary template to be used
}} in articles about specific [[hiking]] trails or [[cycleway]]s. The example on the right shows a good example of how a trail template is properly used.


{{template other
== Blank template ==
| This template is
| {{tl|Infobox hiking trail}} is the primary template to be used
}} in articles about specific [[hiking]] trails. The example on the right shows a good example of how a trail template is properly used.

=== Blank template ===
{{Parameter names example
{{Parameter names example
|_template=Infobox hiking trail
|_template=Infobox trail
| embed
| embed
| cellstyle
| cellstyle
Line 21: Line 21:
| title
| title
| established
| established
| began
| completed
| closed_date
| length
| length
| length_km
| length_km
Line 49: Line 52:
| surface
| surface
| ROW
| ROW
| maintainer
| website
| website
| map
| map
| map_name
| map_name
| map_alt
| map_state
| map_size
| map_caption
| route
| route_state
}}
}}

<pre><nowiki>
<syntaxhighlight lang="wikitext">
{{Infobox hiking trail
{{Infobox trail
| name =
| embed =
| name =
| cellstyle =
| embed =
| photo =
| cellstyle =
| photo_size =
| photo =
| photo_alt =
| photo_size =
| caption =
| photo_alt =
| title =
| caption =
| established =
| title =
| length =
| established =
| location =
| began =
| designation =
| completed =
| trailheads =
| closed_date =
| use = Hiking
| length =
| location =
| designation =
| trailheads =
| use =
| elev_gain_and_loss =
| elev_gain_and_loss =
| elev_change = <!-- Use elev_gain_and_loss if the gain and/or loss is known.
| elev_change = <!-- Use elev_gain_and_loss if the gain and/or loss is known. Use this field when only the change is known. -->
| highest =
Use this field when only the change is known. -->
| highest =
| lowest =
| lowest =
| grade =
| grade =
| difficulty =
| difficulty =
| season =
| season =
| months =
| months =
| waymark =
| waymark =
| sights =
| sights =
| hazards =
| hazards =
| surface =
| surface =
| ROW =
| ROW =
| maintainer =
| website =
| certification =
| website =
| map
| map =
| map_name
| map_name =
| map_state
| map_caption =
| map_size =
| map_alt =
| route =
| route_state =
}}
}}
</syntaxhighlight>
</nowiki></pre>
{{clear}}
{{clear}}


=== Parameter descriptions ===
== Parameter descriptions ==
{| class=wikitable
{| class=wikitable
|-
|-
Line 104: Line 121:
|-
|-
!length_mi
!length_mi
|Length of the trail in miles, as a single number. Will convert to kilometers automatically. Please only use for trails in the United States
|Length of the trail in miles, as a single number. Will convert to kilometers automatically. For information on use of units see [[WP:UNITS|Manual of Style Units]].
|-
|-
!length
!length
Line 116: Line 133:
|-
|-
!use
!use
|always include at least hiking
|always include at least hiking or cycling or ...
|-
|-
!photo
!photo
Line 145: Line 162:
|-
|-
!highest_m
!highest_m
|rowspan=2|Elevation of highest point on trail, in either meters or feet (will autoconvert). Please use _ft only for trails in the United States
|rowspan=2|Elevation of highest point on trail, in either meters or feet (will autoconvert). For information on the use of units see [[WP:UNITS|Manual of Style Units]].
|-
|-
!highest_ft
!highest_ft
Line 187: Line 204:
!ROW
!ROW
|The current or former Right of way, e.g. railroads or railways
|The current or former Right of way, e.g. railroads or railways
|-
!maintainer
|The organisation responsible for maintaining the route
|-
|-
!website
!website
Line 195: Line 215:
|-
|-
!map
!map
|Map of the trail. Can support an image or a [[WP:ROUTE|route diagram template]]
|Map of the trail, if an image
|-
|-
!map_name
!map_name
|Map name. Default is "Trail map".
|Map name. Default is "Trail map".
|-
|-
|map_size
!map_size
|Size of map (either in px or %)
|Size of map (either in px or %)
|-
|-
|map_alt
!map_alt
|Alt text for map
|Alt text for map
|-
!map_caption
|Caption for map
|-
!route
|Map of the trail, if a [[WP:ROUTE|route diagram template]]
|-
!route_state
|Collapsed state of route map
|}
|}


=== Embed inside another Infobox ===
== Embed inside another infobox ==
The hiking trail Infobox can be embedded inside another Infobox for seamless display of info. For example, a hiking trail that is also a protected area, such as the [[Kal-Haven Trail]]. See the [[Template:Infobox hiking trail/testcases|testcases]] for more examples.
The trail infobox can be embedded inside another infobox for seamless display of info. For example, a trail that is also a protected area, such as the [[Kal-Haven Trail]]. See the [[Template:Infobox trail/testcases|testcases]] for more examples.


==== Inserting the hiking Infobox inside the parent Infobox ====
=== Inserting the trail infobox inside the parent infobox ===
The hiking Infobox can only be inserted after certain field values of the parent template. Specifically, only after fields whose values are not passed to another template by the parent templates source code. In other words, the parent templates source code for the field has to output the fields' value without passing it to a template. This may require examining the parent templates source code. It is ok to insert after field values that contain internal <code>[[]]</code> and external links <code>[]</code>.<br />
The trail infobox can only be inserted after certain field values of the parent template. Specifically, only after fields whose values are not passed to another template by the parent templates source code. In other words, the parent templates source code for the field has to output the fields' value without passing it to a template. This may require examining the parent templates source code. It is ok to insert after field values that contain internal <code>[[]]</code> and external links <code>[]</code>.<br />
Example:<br />
Example:
<syntaxhighlight lang="wikitext">
<pre><nowiki>
{| style="float:right; clear:right; border:0; margin:-0.5em 0 0 0;"
{| style="float:right; clear:right; border:0; margin:-0.5em 0 0 0;"
|-
|-
|{{Infobox Protected area
|{{Infobox protected area
| name = Kal-Haven Trail
| name = Kal-Haven Trail
...
...
| governing_body = <div>[[Michigan Department of Natural Resources]]</div>
| governing_body = <div>[[Michigan Department of Natural Resources]]</div>
{{Infobox hiking trail
{{Infobox trail
| embed = yes
| embed = yes
| cellstyle = padding:0.1em 0.3em;
| cellstyle = padding:0.1em 0.3em;
Line 229: Line 258:
}}
}}
|}
|}
</syntaxhighlight>
</nowiki></pre>
Note the &lt;div&gt; tag surrounding the governing_body wiki link. It is needed to reduce the vertical spacing between the governing_body field and the first hiking trail field, in this case, length.
Note the &lt;div&gt; tag surrounding the governing_body wiki link. It is needed to reduce the vertical spacing between the governing_body field and the first hiking trail field, in this case, length.


==== Parent Infobox encapsulation ====
=== Parent infobox encapsulation ===
The parent Infobox needs to be encapsulated in a table as in the above example.
The parent infobox needs to be encapsulated in a table as in the above example.
<syntaxhighlight lang="wikitext">
<pre><nowiki>
{| style="float:right; clear:right; border:0; margin:-0.5em 0 0 0;"
{| style="float:right; clear:right; border:0; margin:-0.5em 0 0 0;"
|-
|-
|(parent Infobox)
|(parent infobox)
|}
|}
</syntaxhighlight>
</nowiki></pre>


==== Parameters ====
== Parameters ==
{| class="wikitable"
{| class="wikitable"
! style="width: 14%" | Field name || Description
! style="width: 14%" | Field name || Description
Line 252: Line 281:
|}
|}


=== Example ===
== Example ==
{{Infobox hiking trail
{{Infobox trail
| name = Wonderland Trail
| name = Wonderland Trail
| photo = CowlitzDivide.JPG
| photo = CowlitzDivide.JPG
Line 262: Line 291:
| author = Filley, Bette
| author = Filley, Bette
| year = 2002
| year = 2002
| title = Discovering the Wonders of the Wonderland Trail: Encircling Mount Rainier (5th edition)
| title = Discovering the Wonders of the Wonderland Trail: Encircling Mount Rainier
| publisher = Dunamis House
| publisher = Dunamis House
| isbn = 1-880405-09-1
| isbn = 1-880405-09-1
}}</ref>
| edition = 5th
}}</ref>
| trailheads = [[Longmire, Washington|Longmire Lodge]] <br/> [[Mowich Lake]] <br/> Ipsut Creek Camp Ground <br/> [[Sunrise (Mount Rainier)|Sunrise parking area]] <br/> White River Camp Ground <br/> Fryingpan Creek Trailhead <br/> Box Canyon <br/> Reflection Lakes <br/> Cougar Rock
| trailheads = [[Longmire, Washington|Longmire Lodge]] <br/> [[Mowich Lake]] <br/> Ipsut Creek Camp Ground <br/> [[Sunrise (Mount Rainier)|Sunrise parking area]] <br/> White River Camp Ground <br/> Fryingpan Creek Trailhead <br/> Box Canyon <br/> Reflection Lakes <br/> Cougar Rock
| use = [[Hiking]]
| use = [[Hiking]]
Line 272: Line 302:
{{cite book
{{cite book
| author = Spring, Ira
| author = Spring, Ira
| authorlink = Ira Spring
| author-link = Ira Spring
| authorlink2 = Harvey Manning
| author-link2 = Harvey Manning
| author2=Manning, Harvey
| author2=Manning, Harvey
| year = 1999
| year = 1999
Line 281: Line 311:
}}</ref>
}}</ref>
| lowest = Ipsut Creek Campground {{convert|2320|ft|m|-1}}<ref name="Filley"/>
| lowest = Ipsut Creek Campground {{convert|2320|ft|m|-1}}<ref name="Filley"/>
| season = Summer to early [[Autumn|Fall]]
| season = Summer to early [[Autumn|fall]]
| months = Mid-July through late September
| months = Mid-July through late September
| website = [http://www.nps.gov/mora/planyourvisit/the-wonderland-trail.htm nps.gov/mora/planyourvisit/the-wonderland-trail.htm]
| website = [http://www.nps.gov/mora/planyourvisit/the-wonderland-trail.htm nps.gov/mora/planyourvisit/the-wonderland-trail.htm]
}}
}}
<pre style="overflow:auto;"><nowiki>
<syntaxhighlight lang="wikitext" style="overflow:auto;">
{{Infobox hiking trail
{{Infobox trail
| name = Wonderland Trail
| name = Wonderland Trail
| photo = CowlitzDivide.JPG
| photo = CowlitzDivide.JPG
Line 295: Line 325:
| author = Filley, Bette
| author = Filley, Bette
| year = 2002
| year = 2002
| title = Discovering the Wonders of the Wonderland Trail: Encircling Mount Rainier (5th edition)
| title = Discovering the Wonders of the Wonderland Trail: Encircling Mount Rainier
| publisher = Dunamis House
| publisher = Dunamis House
| isbn = 1-880405-09-1
| isbn = 1-880405-09-1
| edition = 5th
}}</ref>
}}</ref>
| trailheads = [[Longmire, Washington|Longmire Lodge]] <br/> [[Mowich Lake]] <br/> Ipsut Creek Camp Ground <br/> [[Sunrise (Mount Rainier)|Sunrise parking area]] <br/> White River Camp Ground <br/> Fryingpan Creek Trailhead <br/> Box Canyon <br/> Reflection Lakes <br/> Cougar Rock
| trailheads = [[Longmire, Washington|Longmire Lodge]] <br/> [[Mowich Lake]] <br/> Ipsut Creek Camp Ground <br/> [[Sunrise (Mount Rainier)|Sunrise parking area]] <br/> White River Camp Ground <br/> Fryingpan Creek Trailhead <br/> Box Canyon <br/> Reflection Lakes <br/> Cougar Rock
Line 305: Line 336:
{{cite book
{{cite book
| author = Spring, Ira
| author = Spring, Ira
| authorlink = Ira Spring
| author-link = Ira Spring
| authorlink2 = Harvey Manning
| author-link2 = Harvey Manning
| author2=Manning, Harvey
| author2=Manning, Harvey
| year = 1999
| year = 1999
Line 314: Line 345:
}}</ref>
}}</ref>
| lowest = Ipsut Creek Campground {{convert|2320|ft|m|-1}}<ref name="Filley"/>
| lowest = Ipsut Creek Campground {{convert|2320|ft|m|-1}}<ref name="Filley"/>
| season = Summer to early [[Autumn|Fall]]
| season = Summer to early [[Autumn|fall]]
| months = Mid-July through late September
| months = Mid-July through late September
| website = [http://www.nps.gov/mora/planyourvisit/the-wonderland-trail.htm nps.gov/mora/planyourvisit/the-wonderland-trail.htm]
| website = [http://www.nps.gov/mora/planyourvisit/the-wonderland-trail.htm nps.gov/mora/planyourvisit/the-wonderland-trail.htm]
}}
}}
</syntaxhighlight>
</nowiki></pre>


== Tracking category ==
<div style="display: none"><references /></div>
* {{clc|Pages using infobox trail with unknown parameters}}


== TemplateData ==
<templatedata>
{
"params": {
"name": {
"label": "Name",
"description": "Name of the trail; defaults to page name",
"type": "string",
"suggested": true
},
"length_km": {
"label": "Length in kilometers",
"description": "Will convert to miles automatically",
"type": "number"
},
"length_mi": {
"label": "Length in miles",
"description": "Will convert to kilometers automatically",
"type": "number"
},
"length": {
"label": "Length",
"description": "No auto-conversion",
"type": "string"
},
"location": {
"label": "Location",
"description": "including park, state, county or region where appropriate and country",
"suggested": true
},
"trailheads": {
"label": "Trailheads"
},
"use": {
"label": "Use",
"example": "hiking, cycling",
"type": "string",
"suggested": true
},
"photo": {
"label": "Photo",
"type": "wiki-file-name",
"suggested": true
},
"photo_size": {
"label": "Photo size",
"description": "Width of displayed photo, in pixels. Defaults to 250. ",
"type": "number"
},
"photo_alt": {
"label": "Photo alternate text"
},
"designation": {
"label": "Designation",
"example": "UK National Trail, US National Scenic Trail"
},
"established": {
"label": "Established",
"suggested": true
},
"elev_gain_and_loss": {
"label": "Elevation gain/loss",
"description": "Gain/loss with no units; use {{convert}}",
"type": "string"
},
"elev_change": {
"label": "Elevation change",
"description": "The sum of the altitude climbed or descended through the trail; use {{convert}}"
},
"elev_change_ft": {
"label": "Elevation change (ft)",
"description": "The sum of the altitude climbed or descended through the trail; will be auto-converted",
"type": "number"
},
"elev_change_m": {
"label": "Elevation change (m)",
"description": "The sum of the altitude climbed or descended through the trail; will be auto-converted",
"type": "number"
},
"highest_m": {
"label": "Highest point (m)",
"description": "Highest point in meters; will be auto-converted",
"type": "number"
},
"highest_ft": {
"label": "Highest point (ft)",
"description": "Highest point in feet; will be auto-converted",
"type": "number"
},
"highest_name": {
"label": "Highest point",
"description": "Name of highest point in trail (for use with highest_ft or highest_m)",
"type": "string"
},
"lowest_m": {
"label": "Lowest point (m)",
"type": "number"
},
"lowest_ft": {
"label": "Lowest point (ft)",
"type": "number"
},
"lowest": {
"label": "Lowest point"
},
"lowest_name": {
"label": "Name of lowest point",
"description": "Name of lowest point in trail (for use with lowest_ft or lowest_m)",
"type": "string"
},
"grade": {
"label": "Grade",
"description": "Grade in percent"
},
"difficulty": {
"label": "Difficulty",
"description": "The difficulty of the trail for a typical healthy person, based on a reliable source",
"type": "string"
},
"season": {
"label": "Season",
"description": "The season(s) that the trail may be hiked, or is easily accessible ",
"type": "string"
},
"months": {
"label": "Months",
"description": "The months that the trail may be hiked, or is easily accessible "
},
"sights": {
"label": "Sights"
},
"hazards": {
"label": "Hazards"
},
"surface": {
"label": "Surface",
"description": "Material used as the surface of the trail",
"example": "natural, gravel, ballast, asphalt",
"type": "string"
},
"ROW": {
"label": "Right-of-way",
"description": "The current or former Right of way, e.g. railroads or railways ",
"type": "string"
},
"maintainer": {
"label": "Maintainer",
"description": "Organization responsible for maintaining the route",
"type": "string",
"suggested": true
},
"website": {
"label": "Website",
"description": "Use {{URL}} or {{official URL}}",
"suggested": true
},
"waymark": {
"label": "Waymark",
"description": "Description of the waymark (sign or symbol) used to mark or signpost the route",
"type": "string"
},
"map": {
"label": "Map image",
"description": "Map of the trail, if an image ",
"type": "wiki-file-name"
},
"map_name": {
"label": "Map image name",
"description": "Map name. Default is \"Trail map\"",
"default": "Trail map"
},
"map_size": {
"label": "Map image size",
"description": "Size of map (either in px or %) "
},
"map_alt": {
"label": "Map image alt text",
"type": "string"
},
"map_caption": {
"label": "Map image caption",
"type": "string"
},
"route": {
"label": "Route diagram",
"description": "Map of the trail, from a template in [[Category:Trail routemap templates]]",
"type": "string",
"example": "{{Routemap|inline=1}}"
},
"route_state": {
"label": "Route diagram collapsed state",
"description": "Collapsed state of route map ",
"type": "string",
"suggestedvalues": [
"collapsed",
"uncollapsed"
],
"default": "uncollapsed"
},
"embed": {
"label": "Embed",
"description": "Set to \"yes\" if this template is embedded inside another template",
"type": "string",
"suggestedvalues": [
"yes"
],
"default": "yes"
},
"cellstyle": {
"description": "Set to a class/style that matches the outer Infoboxes cell class/style so that the columns line up properly; see template documentation for more details",
"type": "string"
},
"title": {
"description": "A first colored header before the main infobox, used when embedded, to show the trail name ",
"type": "string"
},
"caption": {
"label": "Photo caption",
"type": "string"
}
},
"format": "block",
"paramOrder": [
"name",
"length_km",
"length_mi",
"length",
"location",
"trailheads",
"use",
"photo",
"caption",
"photo_alt",
"photo_size",
"designation",
"established",
"elev_gain_and_loss",
"elev_change",
"elev_change_ft",
"elev_change_m",
"highest_ft",
"highest_m",
"highest_name",
"lowest_m",
"lowest_ft",
"lowest",
"lowest_name",
"grade",
"difficulty",
"season",
"months",
"sights",
"hazards",
"surface",
"ROW",
"maintainer",
"website",
"waymark",
"map",
"map_name",
"map_size",
"map_alt",
"map_caption",
"route",
"route_state",
"embed",
"cellstyle",
"title"
]
}
</templatedata>
{{template reference list}}
<includeonly>
<includeonly>
{{#ifeq:{{{nocat|}}}|true||
{{#ifeq:{{{nocat|}}}|true||{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Geography and place infobox templates|Hiking Trail]]
[[Category:Place infobox templates|Trail]]
[[Category:Embeddable templates|Hiking Trail]]
[[Category:Embeddable templates]]
[[Category:Templates that add a tracking category]]
}}</includeonly>
}}}}</includeonly>

Latest revision as of 18:58, 15 November 2024

This template is in articles about specific hiking trails or cycleways. The example on the right shows a good example of how a trail template is properly used.

Blank template

[edit]
{{{name}}}
[[File:{{{photo}}}|{{{photo_size}}}|alt={{{photo_alt}}}]]
{{{caption}}}
{{{title}}}
Length{{{length}}}
Location{{{location}}}
Established{{{established}}}
Began construction{{{began}}}
Completed{{{completed}}}
Closed{{{closed_date}}}
Designation{{{designation}}}
Trailheads{{{trailheads}}}
Use{{{use}}}
Elevation gain/loss{{{elev_gain_and_loss}}}
Elevation change{{{elev_change}}}
Highest point{{{highest_name}}}, [convert: invalid number], {{{highest}}}
Lowest point{{{lowest_name}}}, [convert: invalid number], {{{lowest}}}
Grade{{{grade}}}
Difficulty{{{difficulty}}}
Season{{{season}}}
Months{{{months}}}
Waymark{{{waymark}}}
Sights{{{sights}}}
Hazards{{{hazards}}}
Surface{{{surface}}}
Right of way{{{ROW}}}
Maintained by{{{maintainer}}}
Website{{{website}}}
{{{map_name}}}
[[File:{{{map}}}|{{{map_size}}}|alt={{{map_alt}}}]]
{{{map_caption}}}
{{Infobox trail
| name        = 
| embed       = 
| cellstyle   = 
| photo       = 
| photo_size  = 
| photo_alt   = 
| caption     = 
| title       = 
| established = 
| began       = 
| completed   = 
| closed_date = 
| length      = 
| location    = 
| designation = 
| trailheads  = 
| use         = 
| elev_gain_and_loss =
| elev_change = <!-- Use elev_gain_and_loss if the gain and/or loss is known. Use this field when only the change is known. -->
| highest     = 
| lowest      = 
| grade       = 
| difficulty  = 
| season      = 
| months      = 
| waymark     = 
| sights      = 
| hazards     = 
| surface     = 
| ROW         = 
| maintainer  = 
| certification =
| website     = 
| map         = 
| map_name    = 
| map_caption = 
| map_size    = 
| map_alt     = 
| route       = 
| route_state = 
}}

Parameter descriptions

[edit]
Parameter Description
name Name of the trail
length_km Length of the trail in kilometers, as a single number. Will convert to miles automatically
length_mi Length of the trail in miles, as a single number. Will convert to kilometers automatically. For information on use of units see Manual of Style Units.
length Length of trail, no auto-conversion. Use if you want to add more words or citation to length.
location Location of the trail including park, state, county or region where appropriate and country.
trailheads where trail begins and ends
use always include at least hiking or cycling or ...
photo Photo of the area around the trail. Specify as filename.jpg, no need for "File:". Please use a high-resolution original (at least 300 pixels wide).
photo_size Width of displayed photo, in pixels. Defaults to 250.
photo_alt Alternate text for the displayed photo
designation Any designation which the trail has received e.g. UK National Trail or U.S. National Scenic Trail.
established Establishment date
elev_gain_and_loss The elevation gain and/or loss e.g. "{{convert|300|m|ft|-1}} gain" or "{{convert|300|m|ft|-1}} gain in; {{convert|100|m|ft|-1}} gain out". Please express the gain or loss in meters or feet, not kilometers or miles.
elev_change The sum of the altitude climbed or descended through the trail. Auto-converts units if _ft or _m suffix is used.
elev_change_ft
elev_change_m
highest_m Elevation of highest point on trail, in either meters or feet (will autoconvert). For information on the use of units see Manual of Style Units.
highest_ft
highest_name Name of highest point in trail (for use with highest_ft or highest_m)
highest Free field for highest point in trail, use when citations is needed
lowest_m Similar to highest_ etc., except describing the lowest point of the trail
lowest_ft
lowest_name
lowest
grade The grade in percent, typical with former railroad right-of-ways
difficulty The difficulty of the trail for a typical healthy person based on a reliable source
season The season(s) that the trail may be hiked, or is easily accessible
months The months that the trail may be hiked, or is easily accessible
sights Significant sights along the way
hazards Major hazards that a hiker may encounter, as documented by a reliable source
surface The trail surface: natural, gravel, ballast, asphalt, etc.
ROW The current or former Right of way, e.g. railroads or railways
maintainer The organisation responsible for maintaining the route
website Website of the organization that maintains the trail
waymark The waymark (sign or symbol) used to mark or signpost the route
map Map of the trail, if an image
map_name Map name. Default is "Trail map".
map_size Size of map (either in px or %)
map_alt Alt text for map
map_caption Caption for map
route Map of the trail, if a route diagram template
route_state Collapsed state of route map

Embed inside another infobox

[edit]

The trail infobox can be embedded inside another infobox for seamless display of info. For example, a trail that is also a protected area, such as the Kal-Haven Trail. See the testcases for more examples.

Inserting the trail infobox inside the parent infobox

[edit]

The trail infobox can only be inserted after certain field values of the parent template. Specifically, only after fields whose values are not passed to another template by the parent templates source code. In other words, the parent templates source code for the field has to output the fields' value without passing it to a template. This may require examining the parent templates source code. It is ok to insert after field values that contain internal [[]] and external links [].
Example:

{| style="float:right; clear:right; border:0; margin:-0.5em 0 0 0;"
|-
|{{Infobox protected area
| name = Kal-Haven Trail
...
| governing_body = <div>[[Michigan Department of Natural Resources]]</div>
{{Infobox trail
  | embed = yes
  | cellstyle = padding:0.1em 0.3em;
  | name = Kal-Haven Trail
  | length = {{convert|34.5|mi|km|1}}
...
  }}
}}
|}

Note the <div> tag surrounding the governing_body wiki link. It is needed to reduce the vertical spacing between the governing_body field and the first hiking trail field, in this case, length.

Parent infobox encapsulation

[edit]

The parent infobox needs to be encapsulated in a table as in the above example.

{| style="float:right; clear:right; border:0; margin:-0.5em 0 0 0;"
|-
|(parent infobox)
|}

Parameters

[edit]
Field name Description
embed Set to embed = yes when embedding inside another Infobox.
cellstyle Set to a class/style that matches the outer Infoboxes cell class/style so that the columns line up properly. Example for using with {{Infobox protected area}}:
cellstyle = padding:0.1em 0.3em;
title A first colored header before the main infobox, used when embedded, to show the trail name

Example

[edit]
Wonderland Trail
Mt Rainier from the Cowlitz Divide along the Wonderland Trail
Length93 miles (150 km)[1]
LocationMount Rainier National Park, Washington, United States
TrailheadsLongmire Lodge
Mowich Lake
Ipsut Creek Camp Ground
Sunrise parking area
White River Camp Ground
Fryingpan Creek Trailhead
Box Canyon
Reflection Lakes
Cougar Rock
UseHiking
Elevation gain/loss22,000 feet (6,700 m) gain approximately[1]
Highest pointPanhandle Gap 6,750 feet (2,060 m)[2]
Lowest pointIpsut Creek Campground 2,320 feet (710 m)[1]
SeasonSummer to early fall
MonthsMid-July through late September
Websitenps.gov/mora/planyourvisit/the-wonderland-trail.htm
{{Infobox trail
 | name = Wonderland Trail
 | photo = CowlitzDivide.JPG
 | caption = Mt Rainier from the Cowlitz Divide along the Wonderland Trail
 | location = [[Mount Rainier National Park]], [[Washington (state)|Washington]], [[United States]]
 | length = {{convert|93|mi|km|0}}<ref name="Filley">
     {{cite book
     | author = Filley, Bette
     | year = 2002
     | title = Discovering the Wonders of the Wonderland Trail: Encircling Mount Rainier
     | publisher = Dunamis House
     | isbn = 1-880405-09-1
     | edition = 5th
     }}</ref>
 | trailheads = [[Longmire, Washington|Longmire Lodge]] <br/> [[Mowich Lake]] <br/> Ipsut Creek Camp Ground <br/> [[Sunrise (Mount Rainier)|Sunrise parking area]] <br/> White River Camp Ground <br/> Fryingpan Creek Trailhead <br/> Box Canyon <br/> Reflection Lakes <br/> Cougar Rock
 | use = [[Hiking]]
 | elev_gain_and_loss = {{convert|22000|ft|m|-2}} gain approximately<ref name="Filley"/>
 | highest = Panhandle Gap {{convert|6750|ft|m|-1}}<ref name="SpringManningMRNP">
     {{cite book
     | author = Spring, Ira
     | author-link = Ira Spring
     | author-link2 = Harvey Manning
     | author2=Manning, Harvey
     | year = 1999
     | title = 50 Hikes in Mount Rainier National Park
     | publisher = The Mountaineers
     | isbn = 0-89886-572-7
     }}</ref>
 | lowest = Ipsut Creek Campground {{convert|2320|ft|m|-1}}<ref name="Filley"/>
 | season = Summer to early [[Autumn|fall]]
 | months = Mid-July through late September
 | website = [http://www.nps.gov/mora/planyourvisit/the-wonderland-trail.htm nps.gov/mora/planyourvisit/the-wonderland-trail.htm]
}}

Tracking category

[edit]

TemplateData

[edit]

No description.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Namename

Name of the trail; defaults to page name

Stringsuggested
Length in kilometerslength_km

Will convert to miles automatically

Numberoptional
Length in mileslength_mi

Will convert to kilometers automatically

Numberoptional
Lengthlength

No auto-conversion

Stringoptional
Locationlocation

including park, state, county or region where appropriate and country

Unknownsuggested
Trailheadstrailheads

no description

Unknownoptional
Useuse

no description

Example
hiking, cycling
Stringsuggested
Photophoto

no description

Filesuggested
Photo captioncaption

no description

Stringoptional
Photo alternate textphoto_alt

no description

Unknownoptional
Photo sizephoto_size

Width of displayed photo, in pixels. Defaults to 250.

Numberoptional
Designationdesignation

no description

Example
UK National Trail, US National Scenic Trail
Unknownoptional
Establishedestablished

no description

Unknownsuggested
Elevation gain/losselev_gain_and_loss

Gain/loss with no units; use {{convert}}

Stringoptional
Elevation changeelev_change

The sum of the altitude climbed or descended through the trail; use {{convert}}

Unknownoptional
Elevation change (ft)elev_change_ft

The sum of the altitude climbed or descended through the trail; will be auto-converted

Numberoptional
Elevation change (m)elev_change_m

The sum of the altitude climbed or descended through the trail; will be auto-converted

Numberoptional
Highest point (ft)highest_ft

Highest point in feet; will be auto-converted

Numberoptional
Highest point (m)highest_m

Highest point in meters; will be auto-converted

Numberoptional
Highest pointhighest_name

Name of highest point in trail (for use with highest_ft or highest_m)

Stringoptional
Lowest point (m)lowest_m

no description

Numberoptional
Lowest point (ft)lowest_ft

no description

Numberoptional
Lowest pointlowest

no description

Unknownoptional
Name of lowest pointlowest_name

Name of lowest point in trail (for use with lowest_ft or lowest_m)

Stringoptional
Gradegrade

Grade in percent

Unknownoptional
Difficultydifficulty

The difficulty of the trail for a typical healthy person, based on a reliable source

Stringoptional
Seasonseason

The season(s) that the trail may be hiked, or is easily accessible

Stringoptional
Monthsmonths

The months that the trail may be hiked, or is easily accessible

Unknownoptional
Sightssights

no description

Unknownoptional
Hazardshazards

no description

Unknownoptional
Surfacesurface

Material used as the surface of the trail

Example
natural, gravel, ballast, asphalt
Stringoptional
Right-of-wayROW

The current or former Right of way, e.g. railroads or railways

Stringoptional
Maintainermaintainer

Organization responsible for maintaining the route

Stringsuggested
Websitewebsite

Use {{URL}} or {{official URL}}

Unknownsuggested
Waymarkwaymark

Description of the waymark (sign or symbol) used to mark or signpost the route

Stringoptional
Map imagemap

Map of the trail, if an image

Fileoptional
Map image namemap_name

Map name. Default is "Trail map"

Default
Trail map
Unknownoptional
Map image sizemap_size

Size of map (either in px or %)

Unknownoptional
Map image alt textmap_alt

no description

Stringoptional
Map image captionmap_caption

no description

Stringoptional
Route diagramroute

Map of the trail, from a template in [[Category:Trail routemap templates]]

Example
{{Routemap|inline=1}}
Stringoptional
Route diagram collapsed stateroute_state

Collapsed state of route map

Suggested values
collapsed uncollapsed
Default
uncollapsed
Stringoptional
Embedembed

Set to "yes" if this template is embedded inside another template

Suggested values
yes
Default
yes
Stringoptional
cellstylecellstyle

Set to a class/style that matches the outer Infoboxes cell class/style so that the columns line up properly; see template documentation for more details

Stringoptional
titletitle

A first colored header before the main infobox, used when embedded, to show the trail name

Stringoptional

References

  1. ^ a b c Filley, Bette (2002). Discovering the Wonders of the Wonderland Trail: Encircling Mount Rainier (5th ed.). Dunamis House. ISBN 1-880405-09-1.
  2. ^ Spring, Ira; Manning, Harvey (1999). 50 Hikes in Mount Rainier National Park. The Mountaineers. ISBN 0-89886-572-7.