Template:Xpdplain/doc

From TrainzOnline
Revision as of 17:12, 5 July 2013 by Fabartus (talk | contribs) (genesis, port unchanged from Meta-wiki+cat w/{{Meta-wiki})
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search



 
It contains usage information, categories and other informational content that is best arranged so that it is not part of the original template page, such as in many cases, examples of how to use the template in question.
  • Documentation subpages were developed to reduce server demands, or to protect the code version of widely used templates.
     


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

xpdplain: Template:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/w → "ft" [1]

fd:
[[w:foot (length)|<span title="30.48 cm">ft</span>]]

gives:

ft


cnw: [[w:foot (length)|<span title="30.48 cm">ft</span>]]

This page has it's origination in the Wikimedia Foundation's development website Meta-wiki or has been exported and is now part of the newer Mediawiki software resources website for assisting new wikis with startup organization and has been copied according to the terms of the (CC-BY-SA-3.0), the GFDL standard GNU pulic license or the source file(s) is/are in the public domain.

xpdplain: Template:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/w → "a b

c" [2]

fd:
a
b

c

gives:

a b

c


  1. ↑ 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.