Template:Park trail table: Difference between revisions
(allow links and change stub category) |
m (change example to match needed format) |
||
(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 table of the trails associated with the park page it is called on along with any assigned Trail Stubs. | ||
More specifically, it makes a table of the pages with [[:Category:Trails]] 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]], | More specifically, it makes a table of the pages with either the [[:Category:Trail]] (legacy) or [[:Category:Trails]] (revised categorization) and the property [[Property:Park|Park]] set to the page name. It then combines it with a list of any Trail Stubs assigned to the Park for which the template was ran. It also displays the properties [[Property:Trail Distance|Trail Distance]] in miles, the [[Property:Difficulty|Difficulty]], the [[Property:Trail Marking|Trail Marking]], and a brief [[Property:Trail Highlight|Trail Highlight]]. To define the table format (and make it easily format in the desired manner) the queries use the Template [[Template:Park trail table template|Park trail table template]]. | ||
It will also show any trail stubs created on the park page. | |||
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 with the optional Park parameter (it defaults to using the name of the page from which it is run). Typically expected for the current page, but change as needed: | ||
<pre> | <pre> | ||
{{Park trail | {{Park trail table|Park={{PAGENAME}}}} | ||
</pre> | </pre> | ||
Edit the page to see the template text. | Edit the page to see the template text. | ||
Example output for [[Rocky Fork State Park]]: | |||
{{Park trail table template|#userparam=intro}} | |||
{{#ask:[[Category:Trail||Trails]] [[Park::Rocky Fork State Park]] | |||
|mainlabel=trail | |||
| ?Trail Distance#mi-p2=distance | |||
| ?Difficulty=difficulty | |||
| ?Trail Marking=marking | |||
| ?Trail Highlight=highlight | |||
| ?Allowed activities=use | |||
|format=plainlist | |||
|headers=hide | |||
|link=none | |||
|template=Park trail table template | |||
|userparam=row | |||
|named args=yes | |||
}} | |||
{{#ask: [[Category:Trail Stubs]] [[-Has subobject::Rocky Fork State Park]] | |||
| mainlabel=- | |||
| ?Trail=trail | |||
| ?Trail Distance#mi-p2=distance | |||
| ?Difficulty=difficulty | |||
| ?Trail Marking=marking | |||
| ?Trail Highlight=highlight | |||
| ?Park=park | |||
|format=plainlist | |||
|headers=hide | |||
|link=none | |||
|template=Park trail table template | |||
|userparam=stubs row | |||
|named args=yes | |||
}} | |||
{{Park trail table template|#userparam=outro}} | |||
[[Category:Park Class Items]] | [[Category:Park Class Items]] | ||
</noinclude> | </noinclude><includeonly>{{Park trail table template|#userparam=intro}} | ||
<includeonly>{{Park trail table template|#userparam=intro}} | |||
{{#ask:[[Category:Trail||Trails]] [[Park::{{#if: {{{Park|}}}|{{{Park|}}}|{{PAGENAME}} }}]] | {{#ask:[[Category:Trail||Trails]] [[Park::{{#if: {{{Park|}}}|{{{Park|}}}|{{PAGENAME}} }}]] | ||
|mainlabel=trail | |mainlabel=trail | ||
| ?Trail Distance#mi=distance | | ?Trail Distance#mi-p2=distance | ||
| ?Difficulty=difficulty | | ?Difficulty=difficulty | ||
| ?Trail Marking=marking | | ?Trail Marking=marking | ||
| ?Trail Highlight=highlight | |||
| ?Allowed activities=use | |||
|format=plainlist | |format=plainlist | ||
|headers=hide | |headers=hide | ||
|link=none | |||
|template=Park trail table template | |template=Park trail table template | ||
|userparam=row | |userparam=row | ||
Line 38: | Line 63: | ||
| mainlabel=- | | mainlabel=- | ||
| ?Trail=trail | | ?Trail=trail | ||
| ?Trail Distance#mi=distance | | ?Trail Distance#mi-p2=distance | ||
| ?Difficulty=difficulty | | ?Difficulty=difficulty | ||
| ?Trail Marking=marking | | ?Trail Marking=marking | ||
| ?Trail Highlight=highlight | |||
| ?Park=park | |||
|format=plainlist | |format=plainlist | ||
|headers=hide | |headers=hide | ||
|link=none | |||
|template=Park trail table template | |template=Park trail table template | ||
|userparam=row | |userparam=stubs row | ||
|named args=yes | |named args=yes | ||
}} | }} | ||
{{Park trail table template|#userparam=outro}}</includeonly> | {{Park trail table template|#userparam=outro}}</includeonly> |
Latest revision as of 11:15, 28 December 2019
This returns a table of the trails associated with the park page it is called on along with any assigned Trail Stubs.
More specifically, it makes a table of the pages with either the Category:Trail (legacy) or Category:Trails (revised categorization) and the property Park set to the page name. It then combines it with a list of any Trail Stubs assigned to the Park for which the template was ran. It also displays the properties Trail Distance in miles, the Difficulty, the Trail Marking, and a brief Trail Highlight. To define the table format (and make it easily format in the desired manner) the queries use the Template Park trail table template.
It will also show any trail stubs created on the park page.
It should be called in the following format with the optional Park parameter (it defaults to using the name of the page from which it is run). Typically expected for the current page, but change as needed:
{{Park trail table|Park={{PAGENAME}}}}
Edit the page to see the template text.
Example output for Rocky Fork State Park:
Park Trails | Distance | Difficulty | Marking | Usage | Highlight |
---|---|---|---|---|---|
White House Cliffs Trail | 0.95 mi | Medium | Beige plastic TN State Park logo | High-point vista from within Rocky Fork SP | |
Birchfield Camp TrailThis trail is a "stub" either because of its short length, lack of significance, or the page hasn't been created yet. The page can be created, but then delete the stub reference from this park. | 2.70 mi | Medium | Gray | ||
Blockstand Creek Access TrailThis trail is a "stub" either because of its short length, lack of significance, or the page hasn't been created yet. The page can be created, but then delete the stub reference from this park. | 0.90 mi | Easy | Orange | ||
Blockstand Creek TrailThis trail is a "stub" either because of its short length, lack of significance, or the page hasn't been created yet. The page can be created, but then delete the stub reference from this park. | 4.20 mi | Hard | Green | ||
Flint Creek TrailThis trail is a "stub" either because of its short length, lack of significance, or the page hasn't been created yet. The page can be created, but then delete the stub reference from this park. | 2.05 mi | Medium | Light Green | Scenic valley hike - sometimes walking in the creek | |
Headwaters TrailThis trail is a "stub" either because of its short length, lack of significance, or the page hasn't been created yet. The page can be created, but then delete the stub reference from this park. | 1.00 mi | Easy | Blue | Multiple creek crossings - some are deep | |
Rocky Fork AT AccessThis trail is a "stub" either because of its short length, lack of significance, or the page hasn't been created yet. The page can be created, but then delete the stub reference from this park. | 0.35 mi | Medium | Tan | ||
Rocky Fork TrailThis trail is a "stub" either because of its short length, lack of significance, or the page hasn't been created yet. The page can be created, but then delete the stub reference from this park. | 0.70 mi | Easy | Red | Scenic stream-side walk | |
White Oak Flats TrailThis trail is a "stub" either because of its short length, lack of significance, or the page hasn't been created yet. The page can be created, but then delete the stub reference from this park. | 1.30 mi | Medium | Brown |