Examples/Parameter: hlistattr (example 1)

From DynamicPageList3 Manual
Revision as of 06:46, 24 April 2022 by imported>FrozenPlum
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 will select articles in Category:Countries in Europe and orders them by category (which is used in combination with headingmode to put category as header) and pagetouched. mode set as ordered causes the articles that belong to the category to be numbered. The hlistattr adds attributes at the heading/top level which applies a class to color these elements orange, assigns the ID "topmenu" and the font size of 17 pixels. The entire list would appear orange, if the listattr wasn't set which sets the list item to blue. The itemattr sets a class and style to the contents within the list item, to italic.

{{#dpl:
|category    = Countries in Europe
|ordermethod = category,pagetouched
|headingmode = definition
|mode        = ordered
|hlistattr   = id="topmenu" class="dpl-orange-background" style= "font-size:17px;"
|listattr    = id="listitem" class="dpl-blue-background"
|itemattr    = id="submenulistitem" style="font-style: italic;"
|count       = 1
}}

Result

{{#dpl: |category = Countries in Europe |ordermethod = category,pagetouched |headingmode = definition |mode = ordered |hlistattr = class="dpl-orange-background" id="topmenu" style= "font-size:17px;" |listattr = id="listitem" class="dpl-blue-background" |itemattr = id="submenulistitem" style="font-style: italic;" |count = 1 }}