Jump to content

Examples/Parameter: include (example 5)

From DynamicPageList3 Manual
Please do not edit this page unless you're wanting to edit the manual itself, it is an example included in the manual.

Example

[edit source]

This selects the article Apple and includes the output of a surrogate template, since Apple doesn't use the specified template, instead of displaying the content of DPL3 displays a call to a template with the additional suffix ".default" giving the user a chance to either create the missing template, or correct the include/includepage reference.

This example and the corresponding DPL3 behavior is not currently working as previously described. This example is for preservation purposes until it is known if this is intentional (new behavior) or a bug. Template:Details exists, it has {{{1|}}} inside it. The surrogate (Template:Details.example) exists, and there is simple formatting supplied inside it to wrap {{{1|}}} in a span and color the text green. I have confirmed (offsite) that if Template:Details is used on the Apple page, both template and surrogate work as normal. However, when Template:Details use is removed from the Apple page, "Template:Details.example.default" should appear in the second column, but it does not (as seen below).
{{#dpl:
|titlematch  = Apple
|includepage = {Details}.example
|table       = class="wikitable sortable",Page,Surrogate template value 
}}

Result

[edit source]
Page Surrogate template value
Apple
Cookies help us deliver our services. By using our services, you agree to our use of cookies.