Template:Park trail miles: Difference between revisions

From TEHCC Wiki
Jump to navigation Jump to search
(Change trail mileage summer to the trail distance, not round trip)
(Trying number format parser)
Line 9: Line 9:
Edit the page to see the template text.
Edit the page to see the template text.
</noinclude>
</noinclude>
<includeonly>{{#ask: [[Category:Trail]] [[Park::{{PAGENAME}}]]
<includeonly>
| ?Trail Distance#mi
{{#number_format:{{#ask: [[Category:Trail]] [[Park::{{PAGENAME}}]]
| format=sum
  | ?Trail Distance#mi
  | format=sum
}}
|2
}} miles</includeonly>
}} miles</includeonly>

Revision as of 23:20, 18 September 2015

This returns the total mileage of trails assigned to the park page that this template is called on. Note: The template also returns the unit 'miles'.

More specifically, for pages with Category:Trail and the property Park set to the page name, it sums the values in property Trail distance round trip in miles and returns that value. Trail distances need to be cleaned up and likely offer a pure "trail length" separate from "typical hike distance."

It should be called in the following format:

{{Park trail miles}}

Edit the page to see the template text.