Show templates parameters from an article (example): Difference between revisions

From DynamicPageList3 Manual
Content added Content deleted
(Created page with "{{DPL Manual|section=Examples|subsection=Related to Article}} The include parameter can be used to display the output value of a specific argument passed into a template used...")
 
imported>FrozenPlum
m (This may need to get merged elsewhere, or greatly expanded to be a better example, maybe with some other output formatting (for now, fix the example so it works))
 
(14 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{DPL Manual|section=Examples|subsection=Related to Article}}
{{DPL manual|section=Examples|subsection=Show templates parameters from an article}}


The include parameter can be used to display the output value of a specific argument passed into a template used in an article.
The include parameter can be used to display the output value of a specific parameter passed into a template used in an article, using the <code>{Template}:parameter</code> format.
Using the format of <code>{Template}:argument</code> this example will show the subsection given to Template:DPL Manual used in the DPL:Parameters:_Criteria_for_Page_Selection article.


This example will show the subsection given to {{Tl|DPL manual}} used in the [[Criteria for page selection]] article:
This example:


<pre><nowiki>{{#dpl:
<pre>
{{#dpl:
title=DPL:Parameters:_Criteria_for_Page_Selection
|title=Criteria for page selection
|include={DPL Manual}:subsection
|include={DPL manual}:section
}}</nowiki></pre>
}}
</pre>


'''Result:'''<br>
Would produce this output:


<code>{{#dpl:
{{#dpl:
|title=Criteria for page selection
title=DPL:Parameters:_Criteria_for_Page_Selection
|include={DPL Manual}:subsection
|include={DPL manual}:section
}}</code>
}}

[[Category:Miscellaneous examples]]

Latest revision as of 05:45, 3 April 2022

Manual Examples Show templates parameters from an article

The include parameter can be used to display the output value of a specific parameter passed into a template used in an article, using the {Template}:parameter format.

This example will show the subsection given to {{DPL manual}} used in the Criteria for page selection article:

{{#dpl:
|title=Criteria for page selection
|include={DPL manual}:section
}}

Result:

{{#dpl: |title=Criteria for page selection |include={DPL manual}:section }}