Help:Template
From QED
| Help |
|
| Related topics |
For help on MediaWiki templates in general, see Template.
For a guide to existing QED templates, see Templates.
For information about navigational templates, see Help:Navigational Templates.
Contents |
Transcluding one page within another
To transclude one or more pages within another page (the master page), refer to the target pages using the following syntax: {{:Page title}} where Page title is the title of a page in the main namespace.
For example:
= Big Headings =
{{:Quantum Electrodynamics}}
{{:Quantum Foam}}
The content of these target pages will be displayed at the point of transclusion when the master page is rendered. Any change to the content of one of the target pages will automatically be seen when the master page is next rendered. To force re-rendering, see Help:Refresh.
Using "=" within a template parameter value
When a literal "=" cannot be used, use Template:eq, e.g.
{{dotted box
|The equation is E {{eq}} mc<sup>2</sup>
}}
produces:
| The equation is E = mc2 |
Similarly, Template:(( and Template:)) can be used when literal {{ or }} strings are required.
Named values
One way to define a set of named values (i.e. defined constants) would be to define a corresponding set of templates but it is usually better to define a single template that maps names to values.
For example, the standard color for "Cambrian" is Cambrian, and one could define a set of templates accordingly, but it is usually better to define a single template as a mapping.
This is illustrated by Template:period color, which is defined so that for example {{period color|Cambrian}} produces rgb(147,171,110). For an illustration of how this is used in practice, see Help:Timeline.
For details about how to implement such a mapping, see Template:period color.












