Template:Park trail map: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Make park field optional - defaults to pagename if not provided) |
||
Line 9: | Line 9: | ||
Edit the page to see the template text. | Edit the page to see the template text. | ||
</noinclude> | </noinclude> | ||
<includeonly>{{#compound_query: [[Category:Trail||Trails]] [[Park::{{PAGENAME}}]] [[Trailhead location::+]] | <includeonly>{{#compound_query: [[Category:Trail||Trails]] [[Park::{{#if: {{{Park|}}}|{{{Park|}}}|{{PAGENAME}} }}]] [[Trailhead location::+]] | ||
; ?Trailhead location | ; ?Trailhead location | ||
; icon = MarkerT.png | ; icon = MarkerT.png | ||
|[[Category:Trail||Trails]] [[Park::{{PAGENAME}}]] [[Parking location::+]] | |[[Category:Trail||Trails]] [[Park::{{#if: {{{Park|}}}|{{{Park|}}}|{{PAGENAME}} }}]] [[Parking location::+]] | ||
; ?Parking location | ; ?Parking location | ||
; icon = MarkerA.png | ; icon = MarkerA.png | ||
Line 106: | Line 106: | ||
| height = 550 | | height = 550 | ||
| type = terrain | | type = terrain | ||
| kml={{filepath:{{#titleparts:{{PAGENAME}}}}.kml}} | | kml={{filepath:{{#titleparts:{{#if: {{{Park|}}}|{{{Park|}}}|{{PAGENAME}}}}}}.kml}} | ||
}} | }} | ||
{{#if:{{filepath:{{#titleparts:{{PAGENAME}}}}.kml}}|[{{filepath:{{#titleparts:{{PAGENAME}}}}.kml}} Download KML]|[[File:{{#titleparts:{{PAGENAME}}}}.kml{{!}}Upload KML]]}}</includeonly> | {{#if:{{filepath:{{#titleparts:{{#if: {{{Park|}}}|{{{Park|}}}|{{PAGENAME}}}}}}.kml}}|[{{filepath:{{#titleparts:{{#if: {{{Park|}}}|{{{Park|}}}|{{PAGENAME}}}}}}.kml}} Download KML]|[[File:{{#titleparts:{{#if: {{{Park|}}}|{{{Park|}}}|{{PAGENAME}}}}}}.kml{{!}}Upload KML]]}}</includeonly> |
Revision as of 09:28, 18 November 2018
This returns a map of the trails associated with the park page it is called on.
More specifically, it maps the coordinates in Property:Trailhead location from the pages with Category:Trails and the property Park set to the page name or other passed page name.
It should be called in the following format:
{{Park trail map|Park={{PAGENAME}}}}
Edit the page to see the template text.