Examples/Recent Changes

From DynamicPageList3 Manual
Revision as of 21:00, 31 March 2023 by imported>FrozenPlum (Slight tweaks to appearance for use elsewhere.)
Please do not edit this page unless you're wanting to edit the manual itself, it is an example included in the manual.

Example

'''''Recent Changes'''''
{{#dpl:
|namespace=
|allrevisionssince={{#time:Y-m-d|now -7 days}}
|count=20
|noresultsheader=\n''No recent changes to display''
|format=,* [[%PAGE%|%TITLE%]]\n
}}

This selects articles in the main (blank, no prefix) namespace, lists articles with a revision since 7 days before today's date, and limits result count to 20. and formats the result as each item on a new line, bulleted, and linking to the full page name (with namespace prefix). The format settings override the text to display only the page title (without namespace prefix) followed by a new line, so the next line's bullet format correctly takes effect. A header is also output if there are no resuling revisions since the date specified. Results are cached for one hour, so edits don't take immediate effect and may still take a few minutes if purged.

Result

Recent Changes {{#dpl: |namespace= |allrevisionssince=2024-06-25 |count=20 |noresultsheader=\n* No recent changes to display |format=,* %TITLE%\n }}