Template:Xpda/doc

This is the core template of the expansion demo templates.

It produces

wikitext gives result [ link to Special:ExpandTemplates with the wikitext preloaded ]

The item result is just a parameter, the value is supplied by the individual expansion demo templates, each containing the wikitext as expression with explicit braces, pipes and equals signs.

Parameter gives used to provide the text for "gives", but is being deprecated. Temporarily it is retained in the form. Some of the expansion demo templates still specify  in the call of Template:Xpda. However, this is being removed, while the  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.

Parameters l1, l2, .. specify which parts should be linked. This is intended for the option to link the templates called in the wikitext.

The other parameters are the pieces of wikitext, including each brace, pipe and equals sign as separate piece. They 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, and Template:Xpd/url is used to preload it in the input window of Special:ExpandTemplates.