Template:Trip Report Table Format: Difference between revisions

From TEHCC Wiki
Jump to navigation Jump to search
(bold second row)
(add 200 char limit)
 
(One intermediate revision by the same user not shown)
Line 67: Line 67:
{{!}}[[{{{Reported By|}}}|{{#explode:{{{Reported By|}}}|:|1}}]]
{{!}}[[{{{Reported By|}}}|{{#explode:{{{Reported By|}}}|:|1}}]]
{{!}}-{{#ifeq:{{{TEHCC Organized Event|}}}|Yes| style="background: LightGreen; font-weight:bold"}}
{{!}}-{{#ifeq:{{{TEHCC Organized Event|}}}|Yes| style="background: LightGreen; font-weight:bold"}}
{{!}}colspan="5"{{!}}Comment: {{{Hike Comment|}}}
{{!}}colspan="5"{{!}}'''Comment:''' {{#sub:{{{Hike Comment|}}}|0|200}}{{#ifexpr: {{#len:{{{Hike Comment|}}}}} > 200 | [[{{{Report Page|}}}{{!}}...more]] }}
|header={{!}}-
|header={{!}}-
!colspan="7"{{!}}{{{header|}}}
!colspan="7"{{!}}{{{header|}}}
{{!}}-
{{!}}-
}}</includeonly>
}}</includeonly>

Latest revision as of 15:53, 25 September 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.