Anonymous user
Template:DPL parameter.surrogateexample: Difference between revisions
Template:DPL parameter.surrogateexample (view source)
Revision as of 20:54, 11 April 2022
, 2 years agono edit summary
imported>FrozenPlum m (Okay, now I see what they did) |
imported>FrozenPlum mNo edit summary |
||
Line 2:
<!-- Documentation here -->
'''View this page's source to see each of the columns it creates in the table it is used in''' (it formats the second and the third column of results) used in only [[Controlling output format/Parameter: multisecseparators (example 3)|Parameter: multisecseparators (example 3)]].
This template is a surrogate template (also called a 'phantom template') example that formats one result/line of DPL output. DPL then reuses and applies the surrogate template's formatting to each result/line in the output. ▼
Surrogate/phantom templates are used by setting the template name in <code>includepage = {templatename}.suffix</code> (changing the suffix to whatever is descriptive of template purpose). ▼
▲This template is a surrogate template (also called a 'phantom template')
▲Surrogate/phantom templates are used by setting the template name in <code>includepage = {templatename}.suffix</code> (changing the suffix to whatever the template name is, usually the suffix is descriptive of template purpose).
Naming the surrogate/phantom template after its parent, and then adding [[Controlling output volume#Include contents related to templates|a descriptive suffix on the end]], ensures both the parent and surrogate are easily found, and their relationship to each other easily understood. This style of naming them is particularly useful when looking in the Templates category.
|