Template:DPL parameter.dpl: Difference between revisions

From DynamicPageList3 Manual
Content added Content deleted
imported>FrozenPlum
m (3 revisions imported: Imported from help.fandom.com Extension:DPL3 pages, which are for the obsolete version of DPL3 extension for MediaWiki 1.33, to adapt to forked (newer) extension version.)
imported>FrozenPlum
m (Move docs here in case users import/export, then it doesn't take Template:Documentation docs with it, along with modules etc and create a mess. Move the template doc on-page instead.)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[{{{%PAGE%}}}#{{{name}}}|{{{name}}}]] || {{#sub:{{{purpose|}}}|0|50}}<noinclude>
[[{{{%PAGE%}}}#{{{name}}}|{{{name}}}]] || {{#sub:{{{purpose|}}}|0|50}}<noinclude>

[[Category:Formatting templates]]
<!-- Documentation here -->
[[tr:Şablon:DPL parametresi dpl]]</noinclude>
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).

Naming the surrogate/phantom template after the 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 understood. This style of naming them is particularly useful when looking in the Templates category.

==See Also==
* [[{{NAMESPACE}}:{{#explode:{{BASEPAGENAME}}|.}}]] (the template this surrogate provides per-result output formatting for).

<!-- Template categories/interwikis here -->
[[Category:Templates]]
[[Category:Example templates]]
[[Category:Surrogate (phantom) templates]]
</noinclude>

Latest revision as of 05:24, 4 April 2022

[[{{{%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 the 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 understood. This style of naming them is particularly useful when looking in the Templates category.

See Also

  • [[Template:{{#explode:DPL parameter.dpl|.}}]] (the template this surrogate provides per-result output formatting for).