Jump to content

Examples/Parameter: shownamespace (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 category Number examples also in namespace Talk (Talk pages within the Main namespace). Only talk pages added to the category (by placing [[Category:Number examples]] on the talk page) are listed. The shownamespace parameter set to false suppresses namespace prefix display in the results, which are limited to a count of 1.

In DPL3 (versions older than 4.0.0), excluding a namespace with spaces in its name (such as "Help talk") requires replacing the space with an underscore — e.g. "Help_talk". If you use a space instead, exclusions won't work as expected and pages like Help talk:Three is not excluded. This is due to MediaWiki namespaces internally using underscores.

This is not an issue in DPL4 4.0.0 and later, where spaces in namespace names are handled correctly for exclusions.


Code
{{#dpl:
|category      = Number examples
|namespace     = Talk
|shownamespace = false
|count         = 1
}}
Result
Cookies help us deliver our services. By using our services, you agree to our use of cookies.