Template:Park trail count: Difference between revisions

From TEHCC Wiki
Jump to navigation Jump to search
(Remove unneeded return of trail miles in query)
(change to pass page to park templates)
Line 3: Line 3:
More specifically it counts the number of pages with [[:Category:Trail]] and the property [[Property:Park|Park]] set to the page name this template is called on.
More specifically it counts the number of pages with [[:Category:Trail]] and the property [[Property:Park|Park]] set to the page name this template is called on.


It should be called in the following format:
It should be called in the following format, typically expected to reference current page but can be used as needed:
<pre>
<pre>
{{Park trail count}}
{{Park trail count|Park={{PAGENAME}}}}
</pre>
</pre>
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>{{#ask: [[Category:Trail]] [[Park::{{{Park}}}]]
  | format=count
  | format=count
}}</includeonly>
}}</includeonly>

Revision as of 23:05, 25 April 2018

This returns the number of trails assigned to the park that this template is called on.

More specifically it counts the number of pages with Category:Trail and the property Park set to the page name this template is called on.

It should be called in the following format, typically expected to reference current page but can be used as needed:

{{Park trail count|Park={{PAGENAME}}}}

Edit the page to see the template text.