Examples/Parameter: replaceintitle (example 1)

From DynamicPageList3 Manual
Revision as of 23:48, 31 March 2023 by imported>FrozenPlum (FrozenPlum moved page Controlling output format/Parameter: replaceintitle (example 1) to Examples/Parameter: replaceintitle (example 1): Simplifying how things are structured)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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:Examples that are in the category namespace, and that contain "(examples)" anywhere in the title. The first argument of the replaceintitle statement searches for the word "examples" and replaces that with "various examples" so that their content in brackets is displayed as "(various examples)".

{{#dpl:
|category       = Examples
|namespace      = Category
|titlematch     = %(examples)%
|replaceintitle = /examples/,various examples
|count          = 3
}}

Result

{{#dpl: |category = Examples |namespace = Category |titlematch = %(examples)% |replaceintitle = /examples/,various examples |count = 3 }}