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

From DynamicPageList3 Manual
Content added Content deleted
imported>FrozenPlum
(Add example, accounting (hopefully) for the scenario this would most wanted to be used in, explaining how to get rid of the page name i the output (most likely undesired) and suppress the behaviour where sections are added to the TOC (also likely an undesired behaviour). Add that default behaviour can be observed with a simple change (that they can test).)
 
imported>FrozenPlum
m (FrozenPlum moved page Controlling output volume/Parameter: include (example 1) to Examples/Parameter: include (example 1): Simplifying how things are structured)
 
(One intermediate revision by the same user not shown)
Line 6: Line 6:
==Example==
==Example==


This will list all contents of the article [[Apple]]. The <code>{{DPL|format}}</code> line uses <code>__NOTOC__</code> to suppress the behavior where the page headings are automatically added to the current page's table of contents. Not specifying the page name other content in <code>format</code> parameter prevents the page name from being output before the result (the default behavior). If the <code>format</code> line is removed, the default behavior can be observed.
This will list all contents of the article [[Apple]]. The <code>{{DPL|format}}</code> line uses <code><nowiki>__NOTOC__</nowiki></code> to suppress the behavior where the page headings are automatically added to the current page's table of contents. Not specifying the page name other content in <code>format</code> parameter prevents the page name from being output before the result (the default behavior). If the <code>format</code> line is removed, the default behavior can be observed.


<pre>
<pre>
Line 24: Line 24:
}}
}}
<noinclude>
<noinclude>
[[Category:Controlling output volume (examples)‎]]
[[Category:Include contents from the articles in the result set‎]]
[[Category:Uses titlematch parameter]]
[[Category:Uses titlematch parameter]]
[[Category:Uses include parameter]]
[[Category:Uses include parameter]]

Latest revision as of 01:14, 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 will list all contents of the article Apple. The format line uses __NOTOC__ to suppress the behavior where the page headings are automatically added to the current page's table of contents. Not specifying the page name other content in format parameter prevents the page name from being output before the result (the default behavior). If the format line is removed, the default behavior can be observed.

{{#dpl:
|titlematch=Apple
|include=*
|format=__NOTOC__,
}}

Result

{{#dpl: |titlematch=Apple |include=* |format=, }}