Template:Trip Report Table Format

From TEHCC Wiki
Revision as of 12:46, 25 July 2020 by Tim (talk | contribs) (diff nowiki)
Jump to navigation Jump to search

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.