Module:Template parameter value/doc: Difference between revisions
Appearance
Content deleted Content added
Christian75 (talk | contribs) {{high risk}} |
Move from template doc page |
||
Line 3: | Line 3: | ||
Implements {{tl|Template parameter value}} |
Implements {{tl|Template parameter value}} |
||
== Module usage == |
|||
⚫ | |||
The module can be used directly for other modules through the function <code>getValue(page, templates, parameters, options)</code>, which will return a success boolean and either the resulting parameter value or why it failed. |
|||
<code>page</code>, <code>templates</code>, and <code>parameters</code> are all required arguments. <code>options</code> is an optional table which can have the parameters <code>template_index</code>, <code>parameter_index</code>, <code>ignore_subtemplates</code>, <code>only_subtemplates</code>, and <code>ignore_blank</code>. More info on what these parameters do can be found in the template's [[Template:Template parameter value#Template data|template data]]. |
|||
== Testcases == |
|||
⚫ |
Revision as of 12:01, 3 May 2023
![]() | This Lua module is used on approximately 11,300,000 pages, or roughly 18% of all pages. To avoid major disruption and server load, any changes should be tested in the module's /sandbox or /testcases subpages, or in your own module sandbox. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
Implements {{Template parameter value}}
Module usage
The module can be used directly for other modules through the function getValue(page, templates, parameters, options)
, which will return a success boolean and either the resulting parameter value or why it failed.
page
, templates
, and parameters
are all required arguments. options
is an optional table which can have the parameters template_index
, parameter_index
, ignore_subtemplates
, only_subtemplates
, and ignore_blank
. More info on what these parameters do can be found in the template's template data.
Testcases
Testcases are available at Module talk:Template parameter value/testcases