The wiki has moved!

Visit the new wiki at stationeers-wiki.com The old wiki here at legacy.stationeers-wiki.com will sunset eventually.

Edits made after the 7th of March 6PM EST were NOT carried over to the new server as previously announced right here in this box.

 Actions

Template

Difference between revisions of "Parameters/doc"

From Unofficial Stationeers Wiki

< Template:Parameters
(wl)
(|code=)
Line 4: Line 4:
 
{{Lua|Module:Parameters}}
 
{{Lua|Module:Parameters}}
 
== Usage ==
 
== Usage ==
[[Template:Parameters]] extracts a specified template's parameters to aid in template documentation and [[WP:TFD]] merge nominations. It itself takes two parameters: {{Para|1}}, the output format; and {{Para|base}}, the title of a template. The output format must be one of: <code>list</code>, which produces a bulleted list of the base template's parameters; or <code>demo</code>, which produces a {{tl|Parameter names example}}. [[Template:Parameters]] ''must'' always be substituted.
+
[[Template:Parameters]] extracts a specified template's parameters to aid in template documentation and [[WP:TFD]] merge nominations. It itself takes two parameters: {{Para|1}}, the output format; and {{Para|base}}, the title of a template. [[Template:Parameters]] ''must'' always be substituted.
  
== Example ==
 
 
{|
 
{|
 
|-
 
|-
 +
! {{Para|base}}
 
! Input
 
! Input
 
! Output
 
! Output
 
|-
 
|-
 +
! <code>code</code>
 +
| <pre>{{subst:Parameters|code|base=Infobox high court}}</pre>
 +
| <pre>{{Parameters
 +
| court_name =
 +
| native_name =
 +
| image =
 +
| imagesize =
 +
| width =
 +
| height =
 +
| caption =
 +
| image2 =
 +
| imagesize2 =
 +
| caption2 =
 +
| established =
 +
| dissolved =
 +
| country =
 +
| location =
 +
| coordinates =
 +
| motto =
 +
| type =
 +
| at =
 +
| authority =
 +
| appeals =
 +
| terms =
 +
| positions =
 +
| budget =
 +
| website =
 +
| chiefjudgetitle =
 +
| chiefjudgename =
 +
| termstart =
 +
| termend =
 +
| termend2 =
 +
| chiefjudgetitle2 =
 +
| chiefjudgename2 =
 +
| termstart2 =
 +
| termend3 =
 +
| termend4 =
 +
}}</pre>
 +
|-
 +
! <code>demo</code>
 +
| <pre>{{subst:Parameters|demo|base=Infobox high court}}</pre>
 +
| <pre style="white-space: normal; word-break: break-all;">{{Parameter names example|court_name|native_name|image|imagesize|width|height|caption|image2|imagesize2|caption2|established|dissolved|country|location|coordinates|motto|type|at|authority|appeals|terms|positions|budget|website|chiefjudgetitle|chiefjudgename|termstart|termend|termend2|chiefjudgetitle2|chiefjudgename2|termstart2|termend3|termend4}}</pre>
 +
|-
 +
! <code>list</code>
 
| <pre>{{subst:Parameters|list|base=Infobox high court}}</pre>
 
| <pre>{{subst:Parameters|list|base=Infobox high court}}</pre>
| <pre>
+
| <pre>* court_name
* court_name
 
 
* native_name
 
* native_name
 
* image
 
* image
Line 47: Line 90:
 
* termstart2
 
* termstart2
 
* termend3
 
* termend3
* termend4
+
* termend4</pre>
</pre>
 
|-
 
| <pre>{{subst:Parameters|demo|base=Infobox high court}}</pre>
 
| <pre style="white-space: normal; word-break: break-all;">{{Parameter names example|court_name|native_name|image|imagesize|width|height|caption|image2|imagesize2|caption2|established|dissolved|country|location|coordinates|motto|type|at|authority|appeals|terms|positions|budget|website|chiefjudgetitle|chiefjudgename|termstart|termend|termend2|chiefjudgetitle2|chiefjudgename2|termstart2|termend3|termend4}}</pre>
 
 
|}
 
|}
  

Revision as of 13:50, 5 June 2015

Usage

Template:Parameters extracts a specified template's parameters to aid in template documentation and WP:TFD merge nominations. It itself takes two parameters: |1=, the output format; and |base=, the title of a template. Template:Parameters must always be substituted.

|base= Input Output
code
{{subst:Parameters|code|base=Infobox high court}}
{{Parameters
| court_name = 
| native_name = 
| image = 
| imagesize = 
| width = 
| height = 
| caption = 
| image2 = 
| imagesize2 = 
| caption2 = 
| established = 
| dissolved = 
| country = 
| location = 
| coordinates = 
| motto = 
| type = 
| at = 
| authority = 
| appeals = 
| terms = 
| positions = 
| budget = 
| website = 
| chiefjudgetitle = 
| chiefjudgename = 
| termstart = 
| termend = 
| termend2 = 
| chiefjudgetitle2 = 
| chiefjudgename2 = 
| termstart2 = 
| termend3 = 
| termend4 = 
}}
demo
{{subst:Parameters|demo|base=Infobox high court}}
{{Parameter names example|court_name|native_name|image|imagesize|width|height|caption|image2|imagesize2|caption2|established|dissolved|country|location|coordinates|motto|type|at|authority|appeals|terms|positions|budget|website|chiefjudgetitle|chiefjudgename|termstart|termend|termend2|chiefjudgetitle2|chiefjudgename2|termstart2|termend3|termend4}}
list
{{subst:Parameters|list|base=Infobox high court}}
* court_name
* native_name
* image
* imagesize
* width
* height
* caption
* image2
* imagesize2
* caption2
* established
* dissolved
* country
* location
* coordinates
* motto
* type
* at
* authority
* appeals
* terms
* positions
* budget
* website
* chiefjudgetitle
* chiefjudgename
* termstart
* termend
* termend2
* chiefjudgetitle2
* chiefjudgename2
* termstart2
* termend3
* termend4