Examples/Parameter: listattr (example 1)
Appearance
< Examples
Example
[edit source]This selects pages in category Countries in Africa OR Countries in Europe and sets their ordermethod tp category,pagetouched (which is used in combination with headingmode to display category headings in the output, and pages sorted by mode ordered which causes the pages to be numbered. The hlistattr adds CSS formatting at the heading/top level enclosing all other items (and orange in color), and hitemattr adds styles to list items wrapping them in pink/red. listattr applies to type declaration elements, in this case the ordered (ol, or numbered) list elements, coloring them blue, and results are limited to a count of 3.
- Code
{{#dpl:
|category = Countries in Africa¦Countries in Europe
|ordermethod = category,pagetouched
|headingmode = definition
|mode = ordered
|hlistattr = id="dl-example" class="dpl-orange-background"
|hitemattr = id="list-item-heading-attrubite" class="list-item-heading-attrubite"
|listattr = id="ol-example" class="dpl-blue-background"
|count = 3
}}
- Result