Examples/Parameter: include (example 5): Difference between revisions

From DynamicPageList3 Manual
Content added Content deleted
imported>FrozenPlum
(To track until I know better if this new behaviour is intentional or not)
 
imported>FrozenPlum
 
(One intermediate revision by the same user not shown)
Line 7: Line 7:


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 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.
{{note|This example and the corresponding DPL3 behavior is not currently working as described (it worked as described prior). This example is for preservation purposes until it is known if this is intentional (new behavior) or a bug. [[Template:Details]] exists, it has <code><nowiki>{{{1|}}}</nowiki></code> inside it. The surrogate ([[Template:Details.example]]) exists, and there is simple formatting supplied inside it to wrap <code><nowiki>{{{1|}}}</nowiki></code> 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)}}
{{note|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 <code><nowiki>{{{1|}}}</nowiki></code> inside it. The surrogate ([[Template:Details.example]]) exists, and there is simple formatting supplied inside it to wrap <code><nowiki>{{{1|}}}</nowiki></code> 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).}}


<pre>
<pre>

Latest revision as of 01:17, 1 April 2023

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

Example

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

{{#dpl: |titlematch = Apple |includepage = {Details}.example |table = class="wikitable sortable",Page,Surrogate template value }}