Examples/Parameter: columns (example 1): Difference between revisions
< Examples
Content added Content deleted
imported>FrozenPlum (This is a very non-ideal way to do this... but for this example it's necessary. Did my best to explain it, this is a workaround rather than a proper example anyhow.) |
imported>FrozenPlum m (FrozenPlum moved page Controlling output format/Parameter: columns (example 1) to Examples/Parameter: columns (example 1): Simplifying how things are structured) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
==Example== |
==Example== |
||
This will list articles in [[:Category:Fruit examples]] |
This will list articles in [[:Category:Fruit examples]], arranged in 3 columns, the <code>{{DPL|rowcolformat}}</code> is used to make the width 100%. |
||
{{note|'''Note:''' This example uses a '''workaround'''; a [https://www.w3schools.com/tags/tag_div.asp div] tag is used to wrap ''around'' the DPL3 statement, applying [https://www.w3schools.com/cssref/css3_pr_column-count.asp CSS column-count], to make the example function as described.}} |
{{note|'''Note:''' This example uses a '''workaround'''; a [https://www.w3schools.com/tags/tag_div.asp div] tag is used to wrap ''around'' the DPL3 statement, applying [https://www.w3schools.com/cssref/css3_pr_column-count.asp CSS column-count], to make the example function as described.}} |
||
<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 |
||
|includesubpages = false |
|||
|columns = 3 |
|columns = 3 |
||
|rowcolformat = width=100% |
|rowcolformat = width=100% |
||
Line 24: | 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 |
||
|includesubpages = false |
|||
|columns = 3 |
|columns = 3 |
||
|rowcolformat = width=100% |
|rowcolformat = width=100% |
||
Line 34: | Line 32: | ||
</div><!-- workaround end --> |
</div><!-- workaround end --> |
||
<noinclude> |
<noinclude> |
||
[[Category: |
[[Category:Arranging article lists in columns and rows]] |
||
[[Category:Uses category parameter]] |
[[Category:Uses category parameter]] |
||
[[Category:Uses includesubpages parameter]] |
|||
[[Category:Uses columns parameter]] |
[[Category:Uses columns parameter]] |
||
[[Category:Uses rowcolformat parameter]] |
[[Category:Uses rowcolformat parameter]] |
Latest revision as of 23:48, 31 March 2023
Example
This will list articles in Category:Fruit examples, arranged in 3 columns, the rowcolformat
is used to make the width 100%.
<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
}}