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

From DynamicPageList3 Manual
Content added Content deleted
imported>FrozenPlum
(Created page with "<noinclude>{{note|Please '''do not edit''' this page unless you're wanting to edit the manual itself, it is an example included in the manual.|error}}</noinclude><!-- This is the example preloaded for testing, press "Show Preview" to see the example working (at the bottom of the page). If you save this page, it saves as a new section at the bottom of your '''User:Username/Sandbox''' --> ==Example== This selects articles from Category:Fruit examples, article titles...")
 
imported>FrozenPlum
m (FrozenPlum moved page Controlling output format/Parameter: tablerow (example 1) to Examples/Parameter: tablerow (example 1): Simplifying how things are structured)
 
(One intermediate revision by the same user not shown)
Line 28: Line 28:
}}
}}
<noinclude>
<noinclude>
[[Category:Controlling output format (examples)‎]]
[[Category:Generating tabular output]]
[[Category:Uses category parameter]]
[[Category:Uses category parameter]]
[[Category:Uses include parameter]]
[[Category:Uses include parameter]]

Latest revision as of 23:50, 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 selects articles from Category:Fruit examples, article titles automatically placed in the first column as a link (unless suppressed). It then includes the "Fruit-Infobox" template's "grows" parameter value for each article, in the second column. The table statement's first argument sets the table styles, the rest set the remaining header text. Since the first column was automatically generated (it was not intentionally suppressed using - in the second table argument), the first argument of tablerow corresponds to, and formats, the second column; it sets the cell background style (green) and then uses %% to position the value after the formatting. This style is then re-applied to each row of output.

{{#dpl:
|category   = Fruit examples
|include    = {Fruit-Infobox}:grows
|table      = class="wikitable sortable",Page,The first parameter<br>value of template used
|tablerow   = style="background:#eeffee;"¦%%
|count      = 5
}}

Result

{{#dpl: |category = Fruit examples |include = {Fruit-Infobox}:grows |table = class="wikitable sortable",Page,The first parameter
value of template used |tablerow = style="background:#eeffee;"¦%% |count = 5 }}