Select by namespace-related criteria (examples): Difference between revisions
imported>FrozenPlum (Migrate other examples here, they may get parceled out as subpages later, for now they are new/different examples that need a home) |
imported>FrozenPlum m (swap note, the other examples can wait until I have them done in my user space) |
||
Line 1: | Line 1: | ||
{{ |
{{purgenote}} |
||
{{DPL manual|section=Examples|subsection=Select by namespace-related criteria (examples)}} |
{{DPL manual|section=Examples|subsection=Select by namespace-related criteria (examples)}} |
||
{{tocright}} |
{{tocright}} |
Revision as of 06:41, 18 April 2022
Page Template:Purgenote/style.css must have content model "Sanitized CSS" for TemplateStyles (current model is "plain text").
|
Manual | Examples | Select by namespace-related criteria (examples) |
The examples on this page, all select articles based on NAMESPACE for output.
namespace parameter
Main namespace
{{#dpl: |category=Fruit examples |namespace= |count=3 }}
Since the "Main" namespace has no prefix (it is technically blank), specifying a blank value for namespace gives articles in the main namespace that have the category Category:Fruit examples.
Result:
{{#dpl:
|category=Fruit examples
|namespace=
|count=3
}}
Multiple Namespaces
{{#dpl: |category=Number examples |namespace=Help_talk¦ }}
The example gives articles that belong to Category:Number examples that are in the Help talk or the Main namespace.
Result:
{{#dpl:
|category=Number examples
|namespace=Help_talk¦
}}