Examples/Parameter: include (example 6)
Example
This example selects the Examples page, and includes parser function calls {{#dpl:}}
used on that "Examples" page, passing its parameters to a surrogate template called Template:dpl.examples. All #dpl parser function parameters used on the "Examples" page can be used/accessed inside that surrogate template, to display their values in the output, though only {{{category|}}}
and {{{ordermethod|}}}
were used to pass their values to the output below. The table
statement uses default table formatting in the first (empty) argument, the second, third and fourth arguments set the table header text. Since the {{#dpl:}}
parser function was used on the page more than once, and table
format was used (in which row of output are separated with the titles repeating) the page column also repeats for each one (separation and repeating title would not be the case in some other output formats). A value is only displayed for cells that use the corresponding parameter, otherwise they'd appear empty.
{{#dpl: |title = Examples |include = {#dpl}.examples |table = ,Page,<code>category</code> parameter value, <code>ordermethod</code> parameter value }}
Result
{{#dpl:
|title = Examples
|include = {#dpl}.examples
|table = ,Page,category
parameter value, ordermethod
parameter value
}}