Examples/Parameter: tablerow (example 1)

From DynamicPageList3 Manual
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 }}