Template:Trail: Difference between revisions

From TEHCC Wiki
Jump to navigation Jump to search
(First pass at trail template for form use)
m (improve info note linebreaking?)
 
(83 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>This is the 'Trail' template. This template creates the 'sidebar' with info about each trail like the state, nearest city, coordinates of the tail head. If not used, entries marked "Optional" should be left blank (no '*') in the usage to avoid erroneous data connections.  
<noinclude>This is the 'Trail' template. It is expected to be typically used by the [[Form:Trail|Form Trail]].


It should be called in the following format:
This template creates the 'sidebar' with info about each trail like the state, nearest city, coordinates of the tail head. If not used, entries marked "Optional" should be left blank (no '*') in the usage to avoid erroneous data connections.
 
It should be called in the following format ('''remember to delete unused fields after the '=' or delete the entire row'''):
<pre>
<pre>
{{Infobox Trail
{{Trail
| Banner Image = pick a trail tagged photo, if left blank will search for pagename Banner.jpg
| Trail Highlight = Optional - Brief comment about the trail for use in tables and map balloons
  | Trail Number = Optional - Typically a Forest Service Trail #
  | Trail Number = Optional - Typically a Forest Service Trail #
| Trail System = Optional - Is it part of some larger network? (e.g. AT, OMVT, Warriors Path Bike Trails, etc.)
  | Park = Optional - should be name of a park without [[ ]] that has a page
  | Park = Optional - should be name of a park without [[ ]] that has a page
  | Land Owner = Optional - Expected to typically be name of city, state, or national forest (e.g. Kingsport, Cherokee National Forest, or Tennessee)
  | Land Owner = Optional - Expected to typically be name of city, state, or national forest (e.g. Kingsport, Cherokee National Forest, or Tennessee)
  | Wilderness Area = Optional - Name of wilderness area if it applies
  | Wilderness Area = Optional - Name of wilderness area if it applies
  | City = Nearest city
  | City = Nearest city
  | State = State located in
  | Trail Marking = Only mention color unless shape is relevant
| Marking = Trail marking - only color if standard rectangle, otherwise include shape
  | Trail Use = Things you can do on the trail (ATV, dog free, horse, camp, etc.)  
  | Trail Use = Things you can do on the trail (ATV, dog free, horse, camp, etc.)  
  | Trail Features = Things you get to see (Waterfalls, open views, caves, rivers, etc.)
  | Trail Features = Things you get to see (Waterfalls, open views, caves, rivers, etc.)
  | Difficulty Rating = Easy / Medium / Hard
  | Difficulty Rating = Easy / Medium / Hard
  | Hike Time = Default Hours, but accepts Min
  | Hike Time = Typical time from leaving car to returning to do just this trail, thus includes any time on access trails and return trips
| Trail Distance = The strict length of the trail ignoring any repeated sections for obsessive unique trail counters (Default Miles, but accepts Ft, Meters, and km)
  | Round Trip Distance = Typical/shortest trip distance to get from parking to do the trail and back (Default Miles, but accepts Ft, Meters, and km)
  | Round Trip Distance = Typical/shortest trip distance to get from parking to do the trail and back (Default Miles, but accepts Ft, Meters, and km)
| Trail Distance = The strict length of the trail ignoring any repeated sections for obsessive unique trail counters (Default Miles, but accepts Ft, Meters, and km)
  | Trail Type = Loop / In-and-Out / Segment (Choose one of the three)
  | Trail Type = Loop / In-and-Out / Segment (Choose one of the three)
| Elevation Gain = Total climbing distance for described hike direction (Default Feet but accepts Yards, Meters, km)
| Elevation Loss = Total descending distance for described hike direction (Default Feet but accepts Yards, Meters, km)
  | Low Point = Optional - As it is, the lowest elevation of the trail (Default Feet but accepts Yards, Meters, km)
  | Low Point = Optional - As it is, the lowest elevation of the trail (Default Feet but accepts Yards, Meters, km)
  | Elevation Change = Optional - Simple mathematical difference between Low point and High point (Default Feet but accepts Yards, Meters, km)
| High Point = The highest elevation along the trail (Default Feet but accepts Yards, Meters, km)
  | High Point = Default Feet but accepts Yards, Meters, km
  | Elevation Gain = The amount of typical ascent in a round trip (Default Feet but accepts Yards, Meters, km)
  | Parking location = Lat,Lon format, long term replacing Latitude and Longitude above (sets IB map pin)
  | Elevation Loss= The amount of typical descent in a round trip (Default Feet but accepts Yards, Meters, km)
  | Trailhead location = Optional if not within visual distance of parking location
| Elevation Change Direction = The direction chosen for gain/loss reference
  | Parking location = Lat,Lon format of typical parking for trail access (sets IB map pin)
  | Trailhead location = Lat,Lon format of typical trail access
}}
}}
</pre>
</pre>
Edit the page to see the template text.
Edit the page to see the template text.
</noinclude><includeonly><!----
[[Category:Trail Class Items]]
 
</noinclude><includeonly><!-- First some array definitions
hide the table of contents, I'm not expecting our pages so long that they're needed
-->{{#arraydefine:neardistance|5 mi}}<!--
--><div style="float: right; width: 285px"><div class="Infobox_Trail"><!--
-->{{#arraydefine:nearcount|{{#ask: [[Category:Trails]][[Trailhead location::!{{{Trailhead location|}}}]][[Trailhead location::{{{Trailhead location|}}} ({{#arrayprint:neardistance}})]]|format=count}}}}<!--
the class assignment makes sure we get the right CSS applied from Common.css
-->{{#arraydefine:nearmiles|{{#number_format:{{#ask: [[Category:Trails]][[Trailhead location::!{{{Trailhead location|}}}]][[Trailhead location::{{{Trailhead location|}}} ({{#arrayprint:neardistance}})]]||?Trail Distance#mi|format=sum}}|1}}}}<!--Now on with the show
 
-->{{#arraydefine:reportcount|{{#ask: [[Category:Trip Reports]][[Trail::{{PAGENAME}}]]|format=count}}}}<!--
Begin main table
-->{{#arraydefine:recentreports|{{#ask: [[Category:Trip Reports]][[Trail::{{PAGENAME}}]][[Trip Date::>{{#time: F j, Y|-90 days}}]]|format=count}}}}<!--
-->{| style="width: 100%; margin:5px 0 0 0; background:none; border-spacing: 0px;"
-->{| class="Infobox_Trail"
| style="width:50%; vertical-align:top;" |
! style="text-align: center;" colspan="2" |<div style="float: left;">{{List It Button|Page={{PAGENAME}}|Text=List It|Exist Text=Edit List}}</div><span style="font-size: larger;">{{PAGENAME}}</span><div style="float: right;">{{Trip Report Button|Page={{PAGENAME}}|Text=Hiked It}}</div>
{|  
|-
<!--lines like the one below create a visual divider bar cell -->
| colspan=2 border=0 height="200" align="center" valign="top" | {{#if: {{{Banner Image|}}}|[[{{{Banner Image|}}}|350px]]|{{#ifexist: Media:{{PAGENAME}} Banner.jpg|[[File:{{PAGENAME}} Banner.jpg|350px]]|<div style="width:250px"><div class="pops" style="width:200px;height:200px;line-height:250px;text-align:center;border: 1px solid #404040">''[[media:{{PAGENAME}} Banner.jpg|Click here to upload a picture]]''</div></div>}}}}
!colspan="2" |
|-
|-
| colspan=2 border=0 height="200" align="center" valign="top" | {{#ifexist: Media:{{PAGENAME}} Banner.jpg|[[File:{{PAGENAME}} Banner.jpg|270px]]|<div style="width:270px"><div class="pops" style="width:200px;height:200px;line-height:270px;text-align:center;border: 1px solid #404040">''[[media:{{PAGENAME}} Banner.jpg|Click here to upload a picture]]''</div></div>}}
! colspan="2" |  
|-
!colspan="2" |
|-
|-
! width="150" | Trail Name
{{#if: {{{Trail Highlight|}}}|! Highlight}}
| width="130" | {{PAGENAME}}
{{#if: {{{Trail Highlight|}}}|{{!}} [[Trail Highlight::{{{Trail Highlight|}}}]]}}
|-
|-
{{#if: {{{Trail Number|}}}|! Trail Number}}
{{#if: {{{Trail Number|}}}|! Trail Number}}
{{#if: {{{Trail Number|}}}|{{!}} [[Trail number::{{{Trail Number|}}}]]}}
{{#if: {{{Trail Number|}}}|{{!}} [[Trail number::{{{Trail Number|}}}]]}}
|-
{{#if: {{{Trail System|}}}|! Trail System}}
{{#if: {{{Trail System|}}}|{{!}} {{#arraymap:{{{Trail System|}}}|,|@@@@|[[Trail System::@@@@]]}}{{#set:Trail System={{{Trail System|}}}|+sep=,}}}}
|-
|-
{{#if: {{{Park|}}}|! Park}}
{{#if: {{{Park|}}}|! Park}}
Line 60: Line 64:
{{#if: {{{Wilderness Area|}}}|{{!}} [[Wilderness Area::{{{Wilderness Area|}}}]]}}
{{#if: {{{Wilderness Area|}}}|{{!}} [[Wilderness Area::{{{Wilderness Area|}}}]]}}
|-
|-
! Nearest City
! style="width: 125px" | Located
| [[City::{{{City|}}}]]
| {{#if:{{{City|}}}|{{#ifexist:{{{City|}}}|[[City::{{{City|}}}]], [[State::{{#show: {{{City|}}}|?Located In|link=none}}]]|{{#formredlink:target={{{City|}}}|form=Region}}{{#set:City={{{City|}}}}}}}|{{#if:{{{Park|}}}|[[City::{{#show: {{{Park|}}}|?City|link=none}}]], [[State::{{#show: {{{Park|}}}|?State|link=none}}]]{{#info: Location inherited from associated park | info }}}}}}
|-
! [[Property:State | State]]
| [[State::{{{State}}}]]
|-
|-
! Trail Marking
! Trail Marking
| [[Trail Blaze::{{{Marking}}}]]
| [[Trail Marking::{{{Trail Marking}}}]]
|-
|-
! [[ClubWIKI:Trail Use| Trail Use]]
! [[Template:Auto List to Icons| Trail Use]]{{#info: Things allowed to do on or near the trail | info }}
| {{List to Icons|List={{{Trail Use|}}}}}{{#set:Allowed activities={{{Trail Use|}}}|+sep=,}}
| {{Auto List to Icons|List={{{Trail Use|}}}}}{{#set:Allowed activities={{{Trail Use|}}}|+sep=,}}
|-
|-
! Features
! [[Template:Auto List to Icons| Features]]{{#info: Things to see on or near the trail | info }}
| {{List to Icons|List={{{Trail Features|}}}}}{{#set:Features={{{Trail Features|}}}|+sep=,}}
| {{Auto List to Icons|List={{{Trail Features|}}}}}{{#set:Features={{{Trail Features|}}}|+sep=,}}
|-
|-
! [[ClubWIKI:Difficulty Rating| Difficulty Rating]]
! [[ClubWIKI:Difficulty Rating| Difficulty Rating]]
| [[Difficulty::{{{Difficulty Rating}}}]]
| [[Difficulty::{{{Difficulty Rating}}}]]
|-
|-
! Hiking Time
! Hiking Time{{#info: Time from car and back. Includes any time hiking to access this trail. | info }}
| [[Hike Time::{{{Hike Time}}}]]
| [[Hike Time::{{{Hike Time}}}]] round trip
|-
|-
{{#if: {{{Distance|}}}|! Distance, round-trip}}
! Distance:
{{#if: {{{Distance|}}}|{{!}} [[Trail distance round trip::{{{Distance|}}}]]}}
| [[Trail Distance::{{{Trail Distance}}}]] trail{{#info: Strict non-repeating trail length | info }} / [[Trail distance round trip::{{{Round Trip Distance|}}}]] round trip{{#info: Typical or shortest length from the car, hike the trail, and return to car | info }}
|-
|-
{{#if: {{{Trail Distance|}}}|! Distance:<br>round-trip/trail only}}
! Trail Type
{{#if: {{{Trail Distance|}}}|{{!}} [[Trail distance round trip::{{{Round Trip Distance|}}}]] / [[Trail Distance::{{{Trail Distance}}}]]}}
| [[Trail Type::{{{Trail Type}}}]]
|-
|-
{{#if: {{{Trail Type|}}}|! Trail Type}}
! [[TEHCC Wiki:Trail Elevations|{{#if: {{{Low Point|}}}| Low /&nbsp;}}High Point]]
{{#if: {{{Trail Type|}}}|{{!}} [[Trail Type::{{{Trail Type}}}]]}}
| {{#if: {{{Low Point|}}}| [[Trail Low Point::{{{Low Point}}}]] /&nbsp;}}[[Trail High Point::{{{High Point}}}]]
|-
|-
! Climb/Descent Elevation
! [[TEHCC Wiki:Trail Elevations|Elev. Gain/Loss]]{{#info: See link for details of calculation. Gain/Loss is direction dependent. | info }}
| [[Elevation Gain::{{{Elevation Gain}}}]] / [[Elevation Loss::{{{Elevation Loss}}}]]
| [[Elevation Gain::{{{Elevation Gain}}}]] / ([[Elevation Loss::{{{Elevation Loss}}}]]) – [[Elevation Change Direction::{{{Elevation Change Direction}}}]]
|-
|-
! {{#if: {{{Low Point|}}}| Low /&nbsp;}}{{#if: {{{Elevation Change|}}}|Diff /&nbsp;}}High Point
! Trip Reports{{#info: From user "hiked it" submissions<br />Recent is within last 90 days | info }}
| {{#if: {{{Low Point|}}}| [[Trail Low Point::{{{Low Point}}}]] /&nbsp;}}{{#if: {{{Elevation Change|}}}| [[Trail Elevation Difference::{{{Elevation Change}}}]] /&nbsp;}}[[Trail High Point::{{{High Point}}}]]
| {{#ifeq:{{#arrayprint:reportcount}}|0|No hikes logged yet|{{#queryformlink:form=Trip Report Search|link text={{#arrayprint:reportcount}} logged hikes ({{#arrayprint:recentreports}} recent)|query string=Trip_Report_Table[trail]={{PAGENAME}}&Trip_Report_Table[SortOrder]=desc&_run}}}}
|-
|-
{{#if: {{{Parking location|}}}|! Parking}}
! Nearby{{#info: Within {{#arrayprint:neardistance}}<br />Click link to view list | info }}
{{#if: {{{Parking location|}}}|{{!}} [[Parking location::{{{Parking location|}}}]]}}
| {{#ifeq:{{#arrayprint:nearcount}}|0|No other Trails within {{#arrayprint:neardistance}}|{{#queryformlink:form=Trail Search|link text={{#arrayprint:nearcount}} trails / {{#arrayprint:nearmiles}} mi of trail|query string=Trail Search[distance max]={{#arrayprint:neardistance}}&Trail Search[location coordinates]={{{Trailhead location|}}}&_run}}}}
|-
|-
{{#if: {{{Trailhead location|}}}|! Trailhead}}
! Parking
{{#if: {{{Trailhead location|}}}|{{!}} [[Trailhead location::{{{Trailhead location|}}}]]}}
| [[Parking location::{{{Parking location|}}}]] [https://maps.google.com/maps?q={{#replace:{{{Parking location|}}}}} Map]
|-
|-
!colspan="2" |
! Trailhead
| [[Trailhead location::{{{Trailhead location|}}}]] [https://maps.google.com/maps?q={{#replace:{{{Trailhead location|}}}}} Map]
|-
|-
| colspan=2 id="gmap" border=0 height="180" valign="top" style="margin-top: 20px;" |  
| colspan=2 id="gmap" border=0 height="180" valign="top" style="margin-top: 20px;" |  
{{#display_map:{{{Parking location|}}}
{{#google_maps:{{{Parking location|}}}~{{#titleparts:{{PAGENAME}}}}~Main Parking Location|zoom=8|width=100%|height=180px|type=roadmap|controls=}}
|zoom=8
|width=270px
|height=180px
|type=roadmap
|controls=zoom
}}
|
|-
|-
! colspan="2" id="maplink" | [http://maps.google.com/maps?q={{#replace:{{{Parking location|}}}}} Show on Google Maps]<!--
! style="text-align: center;" colspan="2" | <span style="font-size: larger;">[https://maps.google.com/maps?q={{#replace:{{{Parking location|}}}}} Show In Google Maps]</span>
 
|}{{#if:{{filepath:{{#titleparts:{{PAGENAME}}}}.kml}}|{{#set:Has KML Link={{filepath:{{#titleparts:{{PAGENAME}}}}.kml}} }} }}[[Category:Trails]]</includeonly>
close inner table -->
|}
<!-- close outer table -->
|}
</div></div>[[Category:Trail]]</includeonly>

Latest revision as of 19:07, 15 April 2023

This is the 'Trail' template. It is expected to be typically used by the Form Trail.

This template creates the 'sidebar' with info about each trail like the state, nearest city, coordinates of the tail head. If not used, entries marked "Optional" should be left blank (no '*') in the usage to avoid erroneous data connections.

It should be called in the following format (remember to delete unused fields after the '=' or delete the entire row):

{{Trail
 | Banner Image = pick a trail tagged photo, if left blank will search for pagename Banner.jpg
 | Trail Highlight = Optional - Brief comment about the trail for use in tables and map balloons
 | Trail Number = Optional - Typically a Forest Service Trail #
 | Trail System = Optional - Is it part of some larger network? (e.g. AT, OMVT, Warriors Path Bike Trails, etc.)
 | Park = Optional - should be name of a park without [[ ]] that has a page
 | Land Owner = Optional - Expected to typically be name of city, state, or national forest (e.g. Kingsport, Cherokee National Forest, or Tennessee)
 | Wilderness Area = Optional - Name of wilderness area if it applies
 | City = Nearest city
 | Trail Marking = Only mention color unless shape is relevant
 | Trail Use = Things you can do on the trail (ATV, dog free, horse, camp, etc.) 
 | Trail Features = Things you get to see (Waterfalls, open views, caves, rivers, etc.)
 | Difficulty Rating = Easy / Medium / Hard
 | Hike Time = Typical time from leaving car to returning to do just this trail, thus includes any time on access trails and return trips
 | Trail Distance = The strict length of the trail ignoring any repeated sections for obsessive unique trail counters (Default Miles, but accepts Ft, Meters, and km)
 | Round Trip Distance = Typical/shortest trip distance to get from parking to do the trail and back (Default Miles, but accepts Ft, Meters, and km)
 | Trail Type = Loop / In-and-Out / Segment (Choose one of the three)
 | Low Point = Optional - As it is, the lowest elevation of the trail (Default Feet but accepts Yards, Meters, km)
 | High Point = The highest elevation along the trail (Default Feet but accepts Yards, Meters, km)
 | Elevation Gain = The amount of typical ascent in a round trip (Default Feet but accepts Yards, Meters, km)
 | Elevation Loss= The amount of typical descent in a round trip (Default Feet but accepts Yards, Meters, km)
 | Elevation Change Direction = The direction chosen for gain/loss reference
 | Parking location = Lat,Lon format of typical parking for trail access (sets IB map pin)
 | Trailhead location = Lat,Lon format of typical trail access
}}

Edit the page to see the template text.