Template:Trip Report Table: Difference between revisions

From TEHCC Wiki
Jump to navigation Jump to search
m (add test)
m (more testing)
Line 24: Line 24:
</pre>
</pre>
[[Category:Universal Templates]]
[[Category:Universal Templates]]
</noinclude><includeonly>I was told to sort {{{SortOrder|}}}{{Trip Report Table Format|#userparam=intro}}
</noinclude><includeonly>I was told to sort {{{SortOrder|}}} and get trails {{{trail|}}}{{Trip Report Table Format|#userparam=intro}}
{{#ask: [[Category:Trip Reports]]
{{#ask: [[Category:Trip Reports]]
{{#if: {{{userreport|}}}|[[Reported By::{{#arraymap:{{{userreport|}}}|,|@@@@|@@@@|{{!}}{{!}}}}]]}}
{{#if: {{{userreport|}}}|[[Reported By::{{#arraymap:{{{userreport|}}}|,|@@@@|@@@@|{{!}}{{!}}}}]]}}

Revision as of 13:25, 2 August 2020

This creates a table of hikes. It has several options. Each one works exclusive from the rest. Any options that can be passed multiple, use commas as the separator.

  • userreport - omitted will show all hike loggers, otherwise shown for listed user(s) requested - must be in User:username format (the user page name)
  • ShowNewsOnly - if included, it will only show those flagged for newsletter
  • park - not used yet, need to think this through
  • trail - if included, will filter for requested trail(s)
  • dateStart - if included, will filter to be after or on this date - provide in (dd month yyyy) format
  • dateEnd - if included, will filter to be before or on this date - provide in (dd month yyyy) format
  • ShowClubOnly - if included, it will only show club led hikes
  • SortOrder - sorts based on date in direction defined, choices are 'asc' or 'desc' anything else is ignored

For your date entries, you may use the time parser function to get relative dates. e.g. {{#time: 1 F Y | -2 month}}

It expects the following usage format.

{{Trip Report Table
 |userreport =
 |ShowNewsOnly =
 |park =
 |trail =
 |dateStart =
 |dateEnd =
 |ShowClubOnly =
 |SortOrder = 
}}