Edge Rewrite
// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a29ca5cfab338043

Jump to content

Module:Template wrapper positional/doc

From Wikipedia, the free encyclopedia

This is a simplified version of Module:Template wrapper that handles positional arguments better.

Syntax: {{#invoke:Template wrapper positional|main|_template=template|_offset=offset|...extra_args}}

All args other than "_template" and "_offset" are passed unchanged to the parent template, including positional ones. Any numbered arguments are subtracted by the offset param.

This has two sets of use cases. The first is for a template to consume one (or more) positional params and forward the others somewhere else:

For example, if Template:Foo said:

{{#invoke:Template wrapper positional|main|_template=Bar|_offset=1|baz={{{1}}}}}

,

{{foo|a|b|c|quux=123}}

would turn in to:

{{Bar|b|c|baz=a|quux=123}}

The second use case is for a template to modify a positional param and pass the rest unchanged (Module:Template wrapper can't do this since it ignores positional params from the frame). For example, if Template:Foo said:

{{#invoke:Template wrapper positional|main|_template=Bar|This is param 1: {{{1}}}}}

{{foo|a|b|c|quux=123}}

would turn in to:

{{Bar|This is param 1: a|b|c|quux=123}}