Template:Trip Report Table Format: Difference between revisions

From TEHCC Wiki
Jump to navigation Jump to search
(trying to add park link)
m (forgot to close the if)
Line 62: Line 62:
{{!}}-{{#ifeq:{{{TEHCC Organized Event|}}}|Yes| style="background: LightGreen; font-weight:bold"}}
{{!}}-{{#ifeq:{{{TEHCC Organized Event|}}}|Yes| style="background: LightGreen; font-weight:bold"}}
{{!}} style="white-space: nowrap;"{{!}} [[{{{Report Page|}}}{{!}}{{{Trip Date|}}}]]
{{!}} style="white-space: nowrap;"{{!}} [[{{{Report Page|}}}{{!}}{{{Trip Date|}}}]]
{{!}}{{#arraymap:{{{Trail|}}}|,|@@@@|[[@@@@]]}}{{#if: {{#arrayprint:parkname}}|<br/><small>[[{{#arrayprint:parkname}}]]</small>
{{!}}{{#arraymap:{{{Trail|}}}|,|@@@@|[[@@@@]]}}{{#if: {{#arrayprint:parkname}}|<br/><small>[[{{#arrayprint:parkname}}]]</small>}}
{{!}}{{{Trail distance round trip|}}}
{{!}}{{{Trail distance round trip|}}}
{{!}}{{{How Many Hiked|}}}
{{!}}{{{How Many Hiked|}}}

Revision as of 08:40, 25 July 2020

This is a format template for Category:Trip Reports. It is expected to be used in conjunction with a semantic query. The parameter userparam is part of the format 'template' and is used to specify which part of the table is needed to be generated. Repeated calls can use the template to invoke the intro, outro, header, as well as individual row output. If using the header output, you can specify the additional 'header' parameter to give it the text to place in the header row.

It expects the following usage format. Header is only used when #userparam is set to header. Remaining fields are used when #userparam is set to row.

{{Trip Report Table Format
 |#userparam=
 |header=
 |Report Page=
 |Trip Date=
 |Trail=
 |Trail distance round trip=
 |How Many Hiked=
 |Hike Comment=
 |Report Tags=
 |Reported By=
}}

But its usage in practice is like this with the middle two calls of the header and actual query being repeated as necessary

{{Trip Report Table Format|#userparam=intro}}
{{Trip Report Table Format|#userparam=header|header=Hikes for October 2019}}
{{#ask: [[Category:Trip Reports]]
[[Trip Date::>>{{#time: 1 F Y | -2 month}}]]
[[Trip Date::<{{#time: t F Y | -2 month}}]]
 |?Trip Date
 |?Trail
 |?Trail distance round trip
 |?How Many Hiked
 |?Hike Comment
 |?Report Tags
 |?Reported By
 |?TEHCC Organized Event
 |format=plainlist
 |headers=hide
 |link=none
 |sort=Trip Date
 |order=asc
 |mainlabel=Report Page
 |template=Trip Report Table Format
 |userparam=row
 |named args=yes
}}
{{Trip Report Table Format|#userparam=outro}}

Edit the page to see the template text.