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

From DynamicPageList3 Manual
Content added Content deleted
imported>FrozenPlum
m (simplify)
imported>FrozenPlum
m (FrozenPlum moved page Controlling output format/Parameter: columns (example 1) to Examples/Parameter: columns (example 1): Simplifying how things are structured)
 
(2 intermediate revisions by the same user not shown)
Line 11: Line 11:


<pre>
<pre>
<div style="-webkit-column-count:3; column-count:3;"><!-- workaround start -->
<div class="dpl3-column-3" style="-webkit-column-count:3; column-count:3;"><!-- workaround start -->
{{#dpl:
{{#dpl:
|category = Fruit examples
|category = Fruit examples
Line 23: Line 23:
==Result==
==Result==


<div style="-webkit-column-count:3; column-count:3;"><!-- workaround start -->
<div class="dpl3-column-3" style="-webkit-column-count:3; column-count:3;"><!-- workaround start -->
{{#dpl:
{{#dpl:
|category = Fruit examples
|category = Fruit examples
Line 32: Line 32:
</div><!-- workaround end -->
</div><!-- workaround end -->
<noinclude>
<noinclude>
[[Category:Controlling output format (examples)‎]]
[[Category:Arranging article lists in columns and rows]]
[[Category:Uses category parameter]]
[[Category:Uses category parameter]]
[[Category:Uses columns parameter]]
[[Category:Uses columns parameter]]

Latest revision as of 23:48, 31 March 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 articles in Category:Fruit examples, arranged in 3 columns, the rowcolformat is used to make the width 100%.


Note: This example uses a workaround; a div tag is used to wrap around the DPL3 statement, applying CSS column-count, to make the example function as described.
<div class="dpl3-column-3" style="-webkit-column-count:3; column-count:3;"><!-- workaround start -->
{{#dpl:
 |category        = Fruit examples
 |columns         = 3
 |rowcolformat    = width=100%
 |count           = 3
}}
</div><!-- workaround end -->

Result

{{#dpl:

|category        = Fruit examples
|columns         = 3
|rowcolformat    = width=100%
|count           = 3

}}