Template:Xpdplain/doc
This is a documentation subpage for Template:Xpdplain. It contains usage information, categories, and other content that is not part of the original template page. |
Template:Xpdplain uses the system of the expansion demo templates, although for the case where there is no expansion. As opposed to Template:Fd it works in-line, and gives a link to the "Expand templates" page for the specified wikitext. It requires more inserted pipe characters to satisfy the limitations, see Help:Expansion demo templates#Limitations. It does not work for html codes like "→".
Therefore the recommendation is:
- if the wikitext contains html codes like "→"[1], use Template:Fd
- also, if the wikitext contains one or more newlines, and no "Expand templates" link is desired, use Template:Fd.
- otherwise, use Template:Xpdplain
The way of entering the input, and the first part of the output, of Xpdplain is similar to that of Template:Cnw. Since the latter just displays wikitext it can also be used for wikitext with double and triple braces, there is no need for a separate template for each pattern. However, it does not support single and multiple newlines.
Examples
editxpdplain: "[[w:foot (length)|<span title="30.48 cm">ft</span>]]"
→ "ft" [1]
fd:
[[w:foot (length)|<span title="30.48 cm">ft</span>]]
gives:
cnw: [[w:foot (length)|<span title="30.48 cm">ft</span>]]
xpdplain: "a
→ "a
b
b
c"
c" [2]
fd:
a b c
gives:
a b
c
- ↑ Note that such codes are not needed, because the symbol, in this case →, is allowed in the wikitext itself. For ways of entering it, see Help:Special characters#Editing.