Examples/Parameter: replaceintitle (example 1): Difference between revisions

From DynamicPageList3 Manual
Content added Content deleted
imported>FrozenPlum
(Created page with "<noinclude>{{noedit}}</noinclude><!-- This is the example preloaded for testing, press "Show Preview" to see the example working (at the bottom of the page). If you save this page, it saves as a new section at the bottom of your '''User:Username/Sandbox''' --> ==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 <code>replaceintitle</code> stat...")
 
imported>FrozenPlum
 
(One intermediate revision by the same user not shown)
Line 28: Line 28:
}}
}}
<noinclude>
<noinclude>
[[Category:Controlling output format (examples)‎]]
[[Category:Control the way article names are displayed]]
[[Category:Uses category parameter]]
[[Category:Uses category parameter]]
[[Category:Uses namespace parameter]]
[[Category:Uses namespace parameter]]

Latest revision as of 23:48, 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

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