![]() | This is a documentation subpage for Module:Sandbox/BrandonXLF/1. It may contain usage information, categories and other content that is not part of the original module page. |
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.