Module:Sandbox/BrandonXLF/1/doc

This is an old revision of this page, as edited by BrandonXLF (talk | contribs) at 05:23, 4 January 2019 (Testing). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Module:All args (edit | talk | history | links | watch | logs) Calls a template while giving it all the arguments the current page receives.

Arguments directly given to the module are prioritized over ones given to the current page.

Parameters

  • |_t= The template to call
  • |x= x represents any parameter, parameter x will be send to the template that is called.

Example

In this example, the called template gives no arguments to the template being called.

Parent: {{TEMPLATE|Foo|Bar|Baz}}

Template: {{#invoke:Sandbox/BrandonXLF|main|_t=For}}

Result: Script error: The module returned a nil value. It is supposed to return an export table.

In this example, the called template alters the 3rd parameter

Parent: {{TEMPLATE|Foo|Bar|Baz}}

Template: {{#invoke:Sandbox/BrandonXLF|main|_t=For|Foobar}}

Result: Script error: The module returned a nil value. It is supposed to return an export table.

In this example, the called template alters the 3rd parameter, but the parent doesn't define it

Parent: {{TEMPLATE|Foo|Bar}}

Template: {{#invoke:Sandbox/BrandonXLF|main|_t=For|Foobar}}

Result: Script error: The module returned a nil value. It is supposed to return an export table.