Template:Trip Report Button: Difference between revisions

From TEHCC Wiki
Jump to navigation Jump to search
m (add template category)
(add prepopulate hike length)
Line 11: Line 11:
[[Category:Trip Report Class Items]]
[[Category:Trip Report Class Items]]
</noinclude><includeonly>{{#if:{{{popup|}}}|{{#arraydefine:popup|popup}}|}}{{#if:{{CURRENTLOGGEDUSER}}
</noinclude><includeonly>{{#if:{{{popup|}}}|{{#arraydefine:popup|popup}}|}}{{#if:{{CURRENTLOGGEDUSER}}
|{{#arraydefine:pagename|{{#titleparts:{{{Page}}}}}}}{{#formlink:form=Trip Report|link type=button|link text={{{Text|}}}|target=Report:{{#arrayprint:pagename}}-{{CURRENTTIMESTAMP}}|query string=namespace=Report&Trip Report[Trails]={{#arrayprint:pagename}}&Trip Report[Reported By]={{CURRENTUSER}}&Trip Report[Wiki Users on Hike]={{CURRENTUSER}}|{{#arrayprint:popup}}|reload}}
|{{#arraydefine:pagename|{{#titleparts:{{{Page}}}}}}}{{#formlink:form=Trip Report|link type=button|link text={{{Text|}}}|target=Report:{{#arrayprint:pagename}}-{{CURRENTTIMESTAMP}}|query string=namespace=Report&Trip Report[Trails]={{#arrayprint:pagename}}&Trip Report[Reported By]={{CURRENTUSER}}&Trip Report[Wiki Users on Hike]={{CURRENTUSER}}&Trip Report[Hike Length]={{#show:{{#arrayprint:pagename}}|?Trail distance round trip}}|{{#arrayprint:popup}}|reload}}
|<br>''(log in to submit report)''}}</includeonly>
|<br>''(log in to submit report)''}}</includeonly>

Revision as of 11:06, 8 December 2018

It should be called in the following format:

{{Trip Report Button
 |Page=
 |Text=
 |popup=
}}

Edit the page to see the template text.