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

From DynamicPageList3 Manual
Content added Content deleted
imported>FrozenPlum
(Interim save to see if the results will display at all after a save)
 
imported>FrozenPlum
(Fix the example, it was having unexpected results when trying to test its use on the same page the sections themselves resided on)
Line 6: Line 6:
==Example==
==Example==


This selects the [[Apple Pie]] article, and includes the content of its <code><nowiki><section begin="one" /><section end="one" /></nowiki></code> tags (seen using source edit), as well including the values for section tags "two" and "three". The <code>secseparators</code> statement formats places a space, two dashes, and then a space before each result.
'''The section text:'''
<pre>
<section begin="one" />* Section one content<section end="one" />
<section begin="two" />* Section two content<section end="two" />
<section begin="three" />* Section three content<section end="three" />
</pre>

'''The section result:'''
<section begin=one/>* Section '''1''' content<section end=one/>
<section begin=two/>* Section '''2''' content<section end=two/>
<section begin=three/>* Section '''3''' content<section end=three/>



'''The DPL statement:'''
<pre>
<pre>
{{#dpl:
{{#dpl:
|title = Apple Pie
|titlematch=Controlling output volume/Parameter: include (example 7)
|include=one,two,three
|skipthispage=no
|secseparators = &amp;nbsp;--&amp;nbsp;
|include=one,two
|secseparators=&nbsp;--&nbsp;
|multisecseparators=&nbsp;##&nbsp;
}}
}}
</pre>
</pre>
Line 32: Line 18:
==Result==
==Result==
{{#dpl:
{{#dpl:
|title = Apple Pie
|titlematch=Controlling output volume/Parameter: include (example 7)
|include = one,two,three
|skipthispage=no
|secseparators = &nbsp;--&nbsp;
|include=one,two
|secseparators=&nbsp;--&nbsp;
|multisecseparators=&nbsp;##&nbsp;
}}
}}
<noinclude>
<!-- to test with this:
|format=,\n %SECTION%
-->
<noinclude><!--
[[Category:Controlling output volume (examples)‎]]
[[Category:Controlling output volume (examples)‎]]
[[Category:Uses category parameter]]
[[Category:Uses title parameter]]
[[Category:Uses headingmode parameter]]
[[Category:Uses include parameter]]
[[Category:Uses headingmode parameter]]
[[Category:Uses secseparators parameter]]
[[Category:Uses magic word]]
-->
[[Category:Issues]]
</noinclude>
</noinclude>

Revision as of 07:37, 21 April 2022

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 Apple Pie article, and includes the content of its <section begin="one" /><section end="one" /> tags (seen using source edit), as well including the values for section tags "two" and "three". The secseparators statement formats places a space, two dashes, and then a space before each result.

{{#dpl:
|title = Apple Pie
|include=one,two,three
|secseparators = &nbsp;--&nbsp;
}}

Result

{{#dpl: |title = Apple Pie |include = one,two,three |secseparators =  --  }}