Examples/Recent Changes: Difference between revisions

From DynamicPageList3 Manual
Content added Content deleted
imported>FrozenPlum
(Add an example of how to make a Recent Changes list with DPL3)
 
imported>FrozenPlum
m (Slight tweaks to appearance for use elsewhere.)
Line 5: Line 5:
-->
-->
==Example==
==Example==
<pre>'''Recent Changes:'''
<pre>'''''Recent Changes'''''
{{#dpl:
{{#dpl:
|namespace=
|namespace=
Line 18: Line 18:


==Result==
==Result==
'''Recent Changes:'''
'''''Recent Changes'''''
{{#dpl:
{{#dpl:
|namespace=
|namespace=

Revision as of 21:00, 31 March 2023

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 }}