Difference between revisions of "DPL Example 006"
From FollowTheScore
(4 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
You can specify AND, OR and NOT conditions for categories: multiple specifications are treated as AND, within one specification you can use the pipe symbol for OR. | You can specify AND, OR and NOT conditions for categories: multiple specifications are treated as AND, within one specification you can use the pipe symbol for OR. | ||
− | Note that you must escape the pipe character when using DPL as a parser function. You can use ¦ | + | Note that you must escape the pipe character when using DPL as a parser function. '''You can use ¦ instead of | ''' or you can define a template which produces a pipe character. |
<pre><nowiki> | <pre><nowiki> | ||
+ | OAU members | ||
{{#dpl: | {{#dpl: | ||
|category=African Union member states | |category=African Union member states | ||
|addcategories=yes | |addcategories=yes | ||
}} | }} | ||
− | + | ||
+ | fictitious countries | ||
{{#dpl: | {{#dpl: | ||
|category=Fictitious country | |category=Fictitious country | ||
|addcategories=yes | |addcategories=yes | ||
}} | }} | ||
− | + | ||
+ | English speaking countries without French, OAU or fictitious | ||
{{#dpl: | {{#dpl: | ||
− | |category=African Union member | + | |category=African Union member states¦Fictitious country |
− | |notcategory= | + | |category=English-speaking countries |
+ | |notcategory=French-speaking countries | ||
|addcategories=yes | |addcategories=yes | ||
}} | }} | ||
Line 26: | Line 30: | ||
The above DPL command produces the following output: | The above DPL command produces the following output: | ||
---- | ---- | ||
− | + | OAU members | |
{{#dpl: | {{#dpl: | ||
|category=African Union member states | |category=African Union member states | ||
|addcategories=yes | |addcategories=yes | ||
}} | }} | ||
− | + | ||
+ | fictitious countries | ||
{{#dpl: | {{#dpl: | ||
|category=Fictitious country | |category=Fictitious country | ||
|addcategories=yes | |addcategories=yes | ||
}} | }} | ||
− | + | ||
+ | English speaking countries without French, OAU or fictitious | ||
{{#dpl: | {{#dpl: | ||
|category=African Union member states¦Fictitious country | |category=African Union member states¦Fictitious country | ||
− | |category= | + | |category=English-speaking countries |
− | |notcategory= | + | |notcategory=French-speaking countries |
|addcategories=yes | |addcategories=yes | ||
}} | }} |
Latest revision as of 07:43, 5 February 2011
back to list of examples
Create a list of articles belonging (or not belonging) to certain categories
You can specify AND, OR and NOT conditions for categories: multiple specifications are treated as AND, within one specification you can use the pipe symbol for OR.
Note that you must escape the pipe character when using DPL as a parser function. You can use ¦ instead of | or you can define a template which produces a pipe character.
OAU members {{#dpl: |category=African Union member states |addcategories=yes }} fictitious countries {{#dpl: |category=Fictitious country |addcategories=yes }} English speaking countries without French, OAU or fictitious {{#dpl: |category=African Union member states¦Fictitious country |category=English-speaking countries |notcategory=French-speaking countries |addcategories=yes }}
The above DPL command produces the following output:
OAU members
- Somalia . . Categories: African Union member states | Arab League | Divided regions | East Africa | Pages with broken file links | Somalia
- Nigeria . . Categories: African Union member states | Constitutional republics | D8 nations | Economic Community of West African States | English-speaking countries | Former British colonies | G15 nations | Nigeria | Pages with broken file links | Peace and Security Council | Seafaring nations
- Cameroon . . Categories: African Union member states | Cameroon | English-speaking countries | French-speaking countries | La Francophonie | Pages with broken file links | Peace and Security Council
- Sudan . . Categories: African Union member states | Arab League | Arabic-speaking countries | Middle Eastern countries | Military dictatorship | North Africa | Pages with broken file links | Peace and Security Council | Sudan
fictitious countries
- Nigunda . . Categories: Fictitious country | Tag Event | Tag Event2 | Tag XXX | Tag YYY
- Somango . . Categories: English-speaking countries | Fictitious country
- Nigunda Test . . Categories: English-speaking countries | Fictitious country
- DPL Example 007 main page 1 . . Categories: DPL Example 007 main cat | Fictitious country
English speaking countries without French, OAU or fictitious
- Nigeria . . Categories: African Union member states | Constitutional republics | D8 nations | Economic Community of West African States | English-speaking countries | Former British colonies | G15 nations | Nigeria | Pages with broken file links | Peace and Security Council | Seafaring nations
- Somango . . Categories: English-speaking countries | Fictitious country
- Nigunda Test . . Categories: English-speaking countries | Fictitious country