![]() | 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.
Examples
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=See also}}
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=See also|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=See also|Foobar}}
Result: Script error: The module returned a nil value. It is supposed to return an export table.
Default
To specify a default value you can use |x = {{{x|default}}}
.
With x specified:
Parent:
{{TEMPLATE|2=416|city=[[Ottawa]]}}
Template:
{{#invoke:Sandbox/BrandonXLF|main|_t=Jcon|hwy|city={{{city|[[Toronto]]}}}}}
Result: Script error: The module returned a nil value. It is supposed to return an export table.
Without x specified:
Parent:
{{TEMPLATE|2=416}}
Template:
{{#invoke:Sandbox/BrandonXLF|main|_t=Jcon|hwy|416|city={{{city|[[Toronto]]}}}}}
Result: Script error: The module returned a nil value. It is supposed to return an export table.