Template:List It Button: Difference between revisions

From TEHCC Wiki
Jump to navigation Jump to search
m (fix query link)
(make list button list responsive)
Line 7: Line 7:
  |Page=
  |Page=
  |Text=
  |Text=
|Exist Text=
  |popup=
  |popup=
}}
}}
Line 13: Line 14:
[[Category:List Class Items]]
[[Category:List 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=List|link type=button|link text={{{Text|}}}|target=List:{{CURRENTLOGGEDUSER}}/{{#arrayprint:pagename}}|query string=namespace=List&List[Location]={{#arrayprint:pagename}}&List[By]={{CURRENTUSER}}|{{#arrayprint:popup}}|reload}}
|{{#arraydefine:pagename|{{#titleparts:{{{Page}}}}}}}{{#arraydefine:listpagename|List:{{CURRENTLOGGEDUSER}}/{{#arrayprint:pagename}}{{#formlink:form=List|link type=button|link text={{#ifexist:{{#arrayprint:listpagename}}|{{{Exist Text|}}}|{{{Text|}}}}}|target=List:{{CURRENTLOGGEDUSER}}/{{#arrayprint:pagename}}|query string=namespace=List&List[Location]={{#arrayprint:pagename}}&List[By]={{CURRENTUSER}}|{{#arrayprint:popup}}|reload}}
|}}</includeonly>
|}}</includeonly>

Revision as of 14:24, 3 May 2020

This is to show a List button on Park and Trail pages for users to make custom lists.

It should be called in the following format:

{{List It Button
 |Page=
 |Text=
 |Exist Text=
 |popup=
}}

Edit the page to see the template text.