Select by category-related criteria (examples): Difference between revisions

From DynamicPageList3 Manual
Content added Content deleted
m (→‎Further examples of syntax: clean up, replaced: [[zh:Extension::{{subst:BASEPAGENAME}}]] → [[zh:扩展:{{subst:BASEPAGENAME}}]])
mNo edit summary
Line 4: Line 4:
The following example:
The following example:


<pre><nowiki>{{#dpl:
<pre>{{#dpl:
category=DPL3
category=DPL3
}}</nowiki></pre>
}}</pre>


Would produce all the articles in the DPL3 category.
Would produce all the articles in the DPL3 category.
Line 17: Line 17:
To find all articles that feature two category names, such as all wooden chairs, an example would be:
To find all articles that feature two category names, such as all wooden chairs, an example would be:


<pre><nowiki>
<pre>
<DPL>
<DPL>
category = Chair
category = Chair
category = Wood
category = Wood
</DPL>
</DPL>
</nowiki></pre>
</pre>


Or to find all articles that contain one category name, and then another category name from two possible options, such as listing all the chairs that are made of wood as well as all the chairs that are made of metal, would be:
Or to find all articles that contain one category name, and then another category name from two possible options, such as listing all the chairs that are made of wood as well as all the chairs that are made of metal, would be:


<pre><nowiki>
<pre>
<DPL>
<DPL>
category = Chair
category = Chair
category = Wood | Metal
category = Wood | Metal
</DPL>
</DPL>
</nowiki></pre>
</pre>


To sort results alphabetically:
To sort results alphabetically:


<pre><nowiki>
<pre>
<DPL>
<DPL>
category = Chair
category = Chair
Line 41: Line 41:
order = ascending
order = ascending
</DPL>
</DPL>
</nowiki></pre>
</pre>


<!-- Extension prefix in other languages:
<!-- Extension prefix in other languages:

Revision as of 23:20, 29 July 2019

Manual Examples Select by category

Basic example

The following example:

{{#dpl:
category=DPL3
}}

Would produce all the articles in the DPL3 category.

{{#dpl: category=DPL3 }}

Further examples of syntax

To find all articles that feature two category names, such as all wooden chairs, an example would be:

<DPL>
  category = Chair
  category = Wood
</DPL>

Or to find all articles that contain one category name, and then another category name from two possible options, such as listing all the chairs that are made of wood as well as all the chairs that are made of metal, would be:

<DPL>
  category = Chair
  category = Wood | Metal
</DPL>

To sort results alphabetically:

<DPL>
  category = Chair
  ordermethod = titlewithoutnamespace
  order = ascending
</DPL>