From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search

{{{result}}} [1]

Template documentation

This is the core template of the expansion demo templates, see Help:Expansion demo templates. For each supported pattern of wikitext in terms of braces, pipes and equals signs, a separate template is provided, see Help:Expansion demo templates#Supported patterns. The remaining wikitext is provided in pieces as parameters of these expansion demo templates. Each expansion demo template consists of a call of this template Xpda, with as parameters each brace, pipe and equals sign, and the pieces of wikitext passed on.

The expansion demo template, and therefore this template Xpda, produces

wikitextresult [ link to Special:ExpandTemplates with the wikitext preloaded ]

Optional parameter gives allows changing the arrow to some other wikitext, such as the word gives or the code for separating items in a table row.

The pieces of wikitext, including each brace, pipe and equals sign as separate piece, are used for proper display (the first item) and for preloading the input window of Special:ExpandTemplates.


For every piece of wikitext, Template:Xpd/w is used to display it. Due to the fact that the wikitext is split up, expansion is prevented.

Parameters l1, l2, .. (where the first character is a small L) specify which parts should be linked. This is intended for the option to link the templates called in the wikitext.


The result is produced by the expansion demo template by reconstructing the wikitext from the braces, pipes and equals signs, and the other pieces of wikitext. It is just passed on to this template Xpda.

Link to Special:ExpandTemplates with the wikitext preloaded[edit]

For every piece of wikitext, Template:Xpd/url is used to assemble the combined string that is preloaded in the input window of Special:ExpandTemplates.


Parameter gives used to provide the text for "gives", but is being deprecated. Temporarily it is retained in the form {{{gives|}}}. Some of the expansion demo templates still specify gives={{{gives|gives}}} in the call of Template:Xpda. However, this is being removed, while the {{{gives|gives}}} is moved to the start of result. This avoids trimming on the left side of the result if delimiter d is specified as the empty string; this trimming is especially inconvenient if the result is a table: quotes do not look good, but the newline before "{|" is needed. It remains in use as parameter of the expansion demo templates.