Template:DPL parameter.surrogateexample

Revision as of 08:35, 11 April 2022 by imported>FrozenPlum (Going back to original example version)

|[[{{{%PAGE%}}}#{{{name}}}|{{{name}}}]] |{{#sub:|0|50}}

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 includepage = {templatename}.suffix (changing the suffix to whatever is descriptive of template purpose).

Naming the surrogate/phantom template after its parent, and then adding 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.