Template:Park trail list: Difference between revisions

From TEHCC Wiki
Jump to navigation Jump to search
m (Final tweak?)
m (add template category)
 
(16 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 list of the trails associated with the park page it is called on.


More specifically, it lists the pages with [[:Category:Trail]] 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 blaze|Trail blaze]].
More specifically, it lists the pages with [[:Category:Trails]] and the property [[Property:Park|Park]] set to the page name.  


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. Typically expected for the current page, but change as needed:
Line 8: Line 8:
</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:
{{#ask: [[Category:Trail||Trails]] [[Park::Warriors' Path State Park]]
| format=list
}}
[[Category:Park Class Items]]
</noinclude>
</noinclude>
<includeonly>{{#compound_query: [[Category:Trail]] [[Park::{{{Park}}}]]
<includeonly>{{#ask: [[Category:Trail||Trails]] [[Park::{{#if: {{{Park|}}}|{{{Park|}}}|{{PAGENAME}} }}]]  
; mainlabel=Park Trails
  | format=list
; ?Trail Distance#mi=Distance
; ?Difficulty=Difficulty
; ?Trail blaze=Blaze
|[[-Has subobject::{{{Park}}}]]
; ?Trail=Park Trails
; ?Trail Distance#mi=Distance
; ?Difficulty=Difficulty
; ?Trail blaze=Blaze
; mainlabel=-
  |format=table
}}</includeonly>
}}</includeonly>

Latest revision as of 10:25, 20 November 2018

This returns a list of the trails associated with the park page it is called on.

More specifically, it lists the pages with Category:Trails and the property Park set to the page name.

It should be called in the following format. Typically expected for the current page, but change as needed:

{{Park trail list|Park={{PAGENAME}}}}

Edit the page to see the template text.

Example output for Warriors Path State Park: Boneyard, Boneyard Connector, Connector, Darwin's Connector, Darwin's Revenge, Devil's Backbone, Fall Creek Loop, Fawn Loop, Holston Bluffs, Lake Hollow, Lake Road (Warriors Path State Park), Lakeshore, Magic Carpet Ride, Overlook, Pawpaw, Pawpaw Connector, Ridge Top (Warriors Path State Park), Riverbank, Rock City, Sinking Waters, Whitetail Alternate, Whitetail Loop, Woodland Ridge, Zipline