Skip to content

Parameters

An included page can take parameters when it's called, and refers to them with triple braces inside its own body.

Passing parameters in

At the call siteInside the template
{{Greet|Alice|Bob}}{{{1}}} → "Alice", {{{2}}} → "Bob" (positional)
{{Infobox|title=BDO|year=2015}}{{{title}}}, {{{year}}} (named)

Positional and named parameters can be mixed in one call.

Using them, with defaults

In the page's bodyMeaning
{{{title}}}Insert the value of title
{{{title|Untitled}}}…or Untitled if it wasn't supplied
{{{2|{{{1}}}}}}Default to another parameter — defaults can be nested

The _caller parameter

Every included page automatically receives one extra parameter, {{{_caller}}} — the name of the page that included it, slugified (lowercased, non-alphanumeric characters turned into hyphens). It's handy for generating IDs that are unique per call site.