Jump to content

Examples/Parameter: itemattr (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 lists pages in category Countries in Africa OR Countries in Europe and sets ordermethod to category,pagetouched used by headingmode lists categories as header, with pages sorted by pagetouched. mode is set to ordered, which pages listed to be numbered. The hlistattr adds CSS formatting at the heading/top level, enclosing all heading items and making them orange, where the hitemattr adds styles to list items making them pink/red. The listattr parameter applies around type declaration elements, wrapping them in blue, and itemattr sets white styles around individual list items.

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" class="list-item-heading"
|listattr    = id="ol-example" class="dpl-blue-background"
|itemattr    = id="li-example" class="li-example"
|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.