Jump to content

Examples/Parameter: listattr (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

[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
Countries in Africa
  1. Madagascar
Countries in Europe
  1. Finland
  2. England
Cookies help us deliver our services. By using our services, you agree to our use of cookies.