Jump to content

Examples/Parameter: includematch (example 1)

From DynamicPageList3 Manual
Please do not edit this page unless you're wanting to edit the manual itself, it is an example included in the manual.

Example

[edit source]

This lists pages in the category Fruit examples, in the namespace Main, which contain (include) a call to the template Fruit-Infobox and with a grow parameter of that template (using includematch) to restrict results to those whose parameter value contains "Vines" or "vines" as a text string. The include parameter also includes the page name by default in the output, and the grows parameter value. The table parameter is then used to format the results into a (simple) table.

  • There is no pattern specified for the first element of the include statement. "VINES" would not match; the "i" modifier could be used with the regexp to match without case sensitivity if desired.


Code
{{#dpl:
|category     = Fruit examples
|namespace    = Main
|include      = {Fruit-Infobox}:grows
|includematch = /grows\s*=\s*[^¦]*[Vv]ines/s
|table        = class="wikitable", Page, Growth Area
}}
Result
Page Growth Area
Grape On vines
Cookies help us deliver our services. By using our services, you agree to our use of cookies.