Template:Park trail miles: Difference between revisions

From TEHCC Wiki
Jump to navigation Jump to search
m (Undo revision 7071 by Tim (talk) - new version needed enabled in LocalSettings)
Tag: Undo
m (plural category)
Line 1: Line 1:
<noinclude>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'.
<noinclude>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 [[Property:Park|Park]] set to the page name, it sums the values in property [[Property:Trail Distance|Trail Distance]] in miles and returns that value.
More specifically, for pages with [[:Category:Trails]] and the property [[Property:Park|Park]] set to the page name, it sums the values in property [[Property:Trail Distance|Trail Distance]] in miles and returns that value.


It should be called in the following format. Typically expected for current page but can be changed as needed:
It should be called in the following format. Typically expected for current page but can be changed as needed:
Line 9: Line 9:
Edit the page to see the template text.
Edit the page to see the template text.
</noinclude>
</noinclude>
<includeonly>{{#number_format:{{#ask: [[Category:Trail]] [[Park::{{{Park}}}]]
<includeonly>{{#number_format:{{#ask: [[Category:Trails]] [[Park::{{{Park}}}]]
   | ?Trail Distance#mi
   | ?Trail Distance#mi
   | format=sum
   | format=sum

Revision as of 23:43, 17 November 2018

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:Trails and the property Park set to the page name, it sums the values in property Trail Distance in miles and returns that value.

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

{{Park trail miles|Park={{PAGENAME}}}}

Edit the page to see the template text.