Template:Park trail table: Difference between revisions

From TEHCC Wiki
Jump to navigation Jump to search
m (remove some returns?)
m (change example to match needed format)
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>This returns a table of the trails associated with the park page it is called on along with any assigned Trail Stubs.
<noinclude>This returns a table of the trails associated with the park page it is called on along with any assigned Trail Stubs.


More specifically, it makes a table of the pages with [[:Category:Trails]] and the property [[Property:Park|Park]] set to the page name. It also displays the properties [[Property:Trail Distance|Trail Distance]] in miles, the [[Property:Difficulty|Difficulty]], and the [[Property:Trail Marking]].
More specifically, it makes a table of the pages with either the [[:Category:Trail]] (legacy) or [[:Category:Trails]] (revised categorization) and the property [[Property:Park|Park]] set to the page name. It then combines it with a list of any Trail Stubs assigned to the Park for which the template was ran. It also displays the properties [[Property:Trail Distance|Trail Distance]] in miles, the [[Property:Difficulty|Difficulty]], the [[Property:Trail Marking|Trail Marking]], and a brief [[Property:Trail Highlight|Trail Highlight]]. To define the table format (and make it easily format in the desired manner) the queries use the Template [[Template:Park trail table template|Park trail table template]].


It will also show any trail stubs created on the park page.  
It will also show any trail stubs created on the park page.  


It should be called in the following format. Typically expected for the current page, but change as needed:
It should be called in the following format with the optional Park parameter (it defaults to using the name of the page from which it is run). Typically expected for the current page, but change as needed:
<pre>
<pre>
{{Park trail list|Park={{PAGENAME}}}}
{{Park trail table|Park={{PAGENAME}}}}
</pre>
</pre>
Edit the page to see the template text.
Edit the page to see the template text.


Example output for Warriors' Path State Park:  
Example output for [[Rocky Fork State Park]]:  
{{Park trail table template|#userparam=intro}}
{{Park trail table template|#userparam=intro}}
{{#ask:[[Category:Trail||Trails]] [[Park::Warriors' Path State Park]]
{{#ask:[[Category:Trail||Trails]] [[Park::Rocky Fork State Park]]
  |mainlabel=trail
  |mainlabel=trail
  | ?Trail Distance#mi-p2=distance
  | ?Trail Distance#mi-p2=distance
  | ?Difficulty=difficulty
  | ?Difficulty=difficulty
  | ?Trail Marking=marking
  | ?Trail Marking=marking
| ?Trail Highlight=highlight
| ?Allowed activities=use
  |format=plainlist
  |format=plainlist
  |headers=hide
  |headers=hide
|link=none
  |template=Park trail table template
  |template=Park trail table template
  |userparam=row
  |userparam=row
  |named args=yes
  |named args=yes
}}
}}
{{#ask: [[Category:Trail Stubs]] [[-Has subobject::Warriors' Path State Park]]
{{#ask: [[Category:Trail Stubs]] [[-Has subobject::Rocky Fork State Park]]
  | mainlabel=-
  | mainlabel=-
  | ?Trail=trail
  | ?Trail=trail
Line 30: Line 33:
  | ?Difficulty=difficulty
  | ?Difficulty=difficulty
  | ?Trail Marking=marking
  | ?Trail Marking=marking
| ?Trail Highlight=highlight
| ?Park=park
  |format=plainlist
  |format=plainlist
  |headers=hide
  |headers=hide
Line 46: Line 51:
  | ?Difficulty=difficulty
  | ?Difficulty=difficulty
  | ?Trail Marking=marking
  | ?Trail Marking=marking
| ?Trail Highlight=highlight
| ?Allowed activities=use
  |format=plainlist
  |format=plainlist
  |headers=hide
  |headers=hide
|link=none
  |template=Park trail table template
  |template=Park trail table template
  |userparam=row
  |userparam=row
Line 58: Line 66:
  | ?Difficulty=difficulty
  | ?Difficulty=difficulty
  | ?Trail Marking=marking
  | ?Trail Marking=marking
| ?Trail Highlight=highlight
| ?Park=park
  |format=plainlist
  |format=plainlist
  |headers=hide
  |headers=hide

Latest revision as of 11:15, 28 December 2019

This returns a table of the trails associated with the park page it is called on along with any assigned Trail Stubs.

More specifically, it makes a table of the pages with either the Category:Trail (legacy) or Category:Trails (revised categorization) and the property Park set to the page name. It then combines it with a list of any Trail Stubs assigned to the Park for which the template was ran. It also displays the properties Trail Distance in miles, the Difficulty, the Trail Marking, and a brief Trail Highlight. To define the table format (and make it easily format in the desired manner) the queries use the Template Park trail table template.

It will also show any trail stubs created on the park page.

It should be called in the following format with the optional Park parameter (it defaults to using the name of the page from which it is run). Typically expected for the current page, but change as needed:

{{Park trail table|Park={{PAGENAME}}}}

Edit the page to see the template text.

Example output for Rocky Fork State Park:

Park Trails Distance Difficulty Marking Usage Highlight
White House Cliffs Trail 0.95 mi Medium Beige plastic TN State Park logo

HikingGeocaching

High-point vista from within Rocky Fork SP
Birchfield Camp TrailThis trail is a "stub" either because of its short length, lack of significance, or the page hasn't been created yet. The page can be created, but then delete the stub reference from this park. 2.70 mi Medium Gray
Blockstand Creek Access TrailThis trail is a "stub" either because of its short length, lack of significance, or the page hasn't been created yet. The page can be created, but then delete the stub reference from this park. 0.90 mi Easy Orange
Blockstand Creek TrailThis trail is a "stub" either because of its short length, lack of significance, or the page hasn't been created yet. The page can be created, but then delete the stub reference from this park. 4.20 mi Hard Green
Flint Creek TrailThis trail is a "stub" either because of its short length, lack of significance, or the page hasn't been created yet. The page can be created, but then delete the stub reference from this park. 2.05 mi Medium Light Green Scenic valley hike - sometimes walking in the creek
Headwaters TrailThis trail is a "stub" either because of its short length, lack of significance, or the page hasn't been created yet. The page can be created, but then delete the stub reference from this park. 1.00 mi Easy Blue Multiple creek crossings - some are deep
Rocky Fork AT AccessThis trail is a "stub" either because of its short length, lack of significance, or the page hasn't been created yet. The page can be created, but then delete the stub reference from this park. 0.35 mi Medium Tan
Rocky Fork TrailThis trail is a "stub" either because of its short length, lack of significance, or the page hasn't been created yet. The page can be created, but then delete the stub reference from this park. 0.70 mi Easy Red Scenic stream-side walk
White Oak Flats TrailThis trail is a "stub" either because of its short length, lack of significance, or the page hasn't been created yet. The page can be created, but then delete the stub reference from this park. 1.30 mi Medium Brown