Template:Park trail table: Difference between revisions

From TEHCC Wiki
Jump to navigation Jump to search
m (Fix property link)
m (change example to match needed format)
 
(19 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.
<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]].


If selected, 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}}|Show stubs=yes/blank}}
{{Park trail table|Park={{PAGENAME}}}}
</pre>
</pre>
Edit the page to see the template text.
Edit the page to see the template text.


'''Note:''' Site is in a transition from "Trail Blaze" to "Trail Marking" - searches for "Blaze" for now, but at some tipping point I will change this to "Marking"
Example output for [[Rocky Fork State Park]]:
{{Park trail table template|#userparam=intro}}
{{#ask:[[Category:Trail||Trails]] [[Park::Rocky Fork State Park]]
|mainlabel=trail
| ?Trail Distance#mi-p2=distance
| ?Difficulty=difficulty
| ?Trail Marking=marking
| ?Trail Highlight=highlight
| ?Allowed activities=use
|format=plainlist
|headers=hide
|link=none
|template=Park trail table template
|userparam=row
|named args=yes
}}
{{#ask: [[Category:Trail Stubs]] [[-Has subobject::Rocky Fork State Park]]
| mainlabel=-
| ?Trail=trail
| ?Trail Distance#mi-p2=distance
| ?Difficulty=difficulty
| ?Trail Marking=marking
| ?Trail Highlight=highlight
| ?Park=park
|format=plainlist
|headers=hide
|link=none
|template=Park trail table template
|userparam=stubs row
|named args=yes
}}
{{Park trail table template|#userparam=outro}}


Example output for Warriors' Path State Park:
{{#ask: [[Category:Trail||Trails]] [[Park::Warriors' Path State Park]]
| mainlabel=Park Trails
| ?Trail Distance#mi=Distance
| ?Difficulty=Difficulty
| ?Trail Blaze=Blaze
|format=table
}}
[[Category:Park Class Items]]
[[Category:Park Class Items]]
</noinclude>
</noinclude><includeonly>{{Park trail table template|#userparam=intro}}
<includeonly>{{#ask: [[Category:Trail||Trails]] [[Park::{{#if: {{{Park|}}}|{{{Park|}}}|{{PAGENAME}} }}]]  
{{#ask:[[Category:Trail||Trails]] [[Park::{{#if: {{{Park|}}}|{{{Park|}}}|{{PAGENAME}} }}]]
  | mainlabel=Park Trails
  |mainlabel=trail
  | ?Trail Distance#mi=Distance
  | ?Trail Distance#mi-p2=distance
  | ?Difficulty=Difficulty
  | ?Difficulty=difficulty
  | ?Trail Blaze=Blaze
| ?Trail Marking=marking
  |format=table
  | ?Trail Highlight=highlight
| ?Allowed activities=use
  |format=plainlist
|headers=hide
|link=none
|template=Park trail table template
|userparam=row
|named args=yes
}}
}}
{{#if:{{{Show stubs|}}}|And the following trails without dedicated pages
{{#ask: [[Category:Trail Stubs]] [[-Has subobject::{{#if: {{{Park|}}}|{{{Park|}}}|{{PAGENAME}} }}]]
{{#ask: [[-Has subobject::Warriors Path State Park]]
| ?Trail=Park Trails
| ?Trail Distance#mi=Distance
| ?Difficulty=Difficulty
| ?Trail Blaze=Blaze
  | mainlabel=-
  | mainlabel=-
  | format=table
| ?Trail=trail
}}}}</includeonly>
| ?Trail Distance#mi-p2=distance
| ?Difficulty=difficulty
| ?Trail Marking=marking
| ?Trail Highlight=highlight
| ?Park=park
  |format=plainlist
|headers=hide
|link=none
|template=Park trail table template
|userparam=stubs row
|named args=yes
}}
{{Park trail table template|#userparam=outro}}</includeonly>

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