Examples/Parameter: category (example 3): Difference between revisions

From DynamicPageList3 Manual
Content added Content deleted
imported>FrozenPlum
(add category)
imported>FrozenPlum
m (formatting)
 
(2 intermediate revisions by the same user not shown)
Line 7: Line 7:
==Example==
==Example==


This list will output pages in [[:Category:Countries in Europe]] OR [[:Category:Countries in North America]], AND [[:Category:Part of NATO]] or a direct subcategory or a second level subcategory of the latter. The list will be ordered (OL tag) and organized in main items/headings, subcategories will not be used as a heading). Under each item/heading you will see a sublist of pages ordered by their {{DPL|ordermethod}} value <code>ordermethod=category,pagetouched</code>, for the category used as the heading.
This will select pages in [[:Category:Countries in Europe]] {{tt|OR}} [[:Category:Countries in North America]], {{tt|AND}} in [[:Category:Part of NATO]] or a direct subcategory or a second level subcategory of the latter. The list will be ordered ({{tt|ol}} tag) in two main headings (matching the categories specified). Under each heading, a sublist of pages appears, ordered by {{tt|category,pagetouched}}.


<pre>
<pre>
<dpl>
{{#dpl:
category=+Countries in Europe¦Countries in North America
|category=+Countries in Europe¦Countries in North America
headingmode=ordered
|headingmode=ordered
ordermethod=category,pagetouched
|ordermethod=category,pagetouched
noresultsheader=\n''no result returned''
|noresultsheader=\n''no result returned''
}}
</dpl>
</pre>
</pre>


==Result==
==Result==
<dpl>
category=+Countries in Europe¦Countries in North America
headingmode=ordered
ordermethod=category,pagetouched
noresultsheader=\n''no result returned''
</dpl>
{{tempnote}}
<!-- at current, the opposite of what is stated (using - instead of +) seems to hold true and give results stated, perhaps either the description of how this is supposed to work is unclear or its example may need to be rewritten for clarity. -->


{{#dpl:
<noinclude>
|category=+Countries in Europe¦Countries in North America
|headingmode=ordered
|ordermethod=category,pagetouched
|noresultsheader=\n''no result returned''
}}
{{tempnote}}<noinclude>
[[Category:Select by category-related criteria]]
[[Category:Select by category-related criteria]]
[[Category:Uses category parameter]]
[[Category:Uses category parameter]]

Latest revision as of 06:52, 1 April 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 pages in Category:Countries in Europe OR Category:Countries in North America, AND in Category:Part of NATO or a direct subcategory or a second level subcategory of the latter. The list will be ordered (ol tag) in two main headings (matching the categories specified). Under each heading, a sublist of pages appears, ordered by category,pagetouched.

{{#dpl:
|category=+Countries in Europe¦Countries in North America
|headingmode=ordered
|ordermethod=category,pagetouched
|noresultsheader=\n''no result returned''
}}

Result

{{#dpl: |category=+Countries in Europe¦Countries in North America |headingmode=ordered |ordermethod=category,pagetouched |noresultsheader=\nno result returned }}

This example is currently non-working, it may be replaced or removed at a later date to improve the clarity of this manual. As this needs to be done at a deliberate pace, the Gamepedia DPL3 Manual can be used in the interim, keeping in mind some functions may have changed.