Examples/Parameter: mode (example 2)

From DynamicPageList3 Manual
Revision as of 23:52, 31 March 2023 by imported>FrozenPlum (FrozenPlum moved page Controlling output format/Parameter: mode (example 2) to Examples/Parameter: mode (example 2): Simplifying how things are structured)
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 match/list articles that have 'Appl' in their name, excluding subpages; pages will be ordered by their name regardless of category, and the output will be shown in category style (i.e., organized alphabetically displaying category-style capital letters) because of the mode parameter. An ordermethod is required when mode=category is set (so DPL3 knows how to order the category listing style), and the titlewithoutnamespace value makes the first letter of the page title used as the category heading. Note that using title instead would cause use of the first letter of the namespace if it exists, and just the title if it doesn't (such as for pages in the Main namespace).

{{#dpl:
|titlematch      = %Appl%
|includesubpages = false
|mode            = category
|ordermethod     = titlewithoutnamespace
|count           = 3
}}

Result

{{#dpl: |titlematch = %Appl% |includesubpages = false |mode = category |ordermethod = titlewithoutnamespace |count = 3 }}