Controlling output order: Difference between revisions

m
no edit summary
imported>FrozenPlum
m (26 revisions imported: Imported from help.fandom.com, Extension:DPL3 pages, which are for the obsolete version of DPL3 extension for MediaWiki 1.33, to adapt to forked (newer) extension version.)
imported>FrozenPlum
mNo edit summary
Line 1:
{{note|This page is in development, some content may be incorrect, outdated, or otherwise misleading. |warn}}
{{DPL manual|section=Parameters|subsection=Controlling output order}}
 
DPL3 allows you to define the sort order of its output, as is explained below.
 
In some cases, this is not sufficient, however. Think of the following example: You create a list of pages which use a certain template. You want to show the value of the first parameter each page uses when calling that template. This can easily be done with the {{dpl3|include}} feature of DPL. If you now wanted the output to be sorted by the value of that parameter, DPL could not help because it had to analyze all articles before finding those parameter values.
 
But there is another way: Create a ''sortable wiki table'' (using the {{dpl3|table}} option of DPL with 'class=sortable') and you can click on the column headings to sort your output accordingly. However, the initial order shown in that table will still be the order in which DPL parsed the wiki pages (usually an alphabetic order of the page names).
Line 43 ⟶ 44:
;''titlewithoutnamespace'': outputs list sorted by the article name regardless of namespace
 
''methodN'' can also be one of the following token combinations (see also [[Extension:DPL3/Parameters: Controlling output format#headingmode|''headingmode'']] option):
 
;''category,firstedit'': outputs list sorted by category, then by first edit
Line 92 ⟶ 93:
</nowiki></pre>
 
This list will output pages that have <nowiki>[[Category:Africa]]</nowiki> shown, ordered from oldest to newest.
In addition, the edit date will be presented with each article.
 
==ordercollation==
Line 99 ⟶ 100:
{{DPL Parameter
|name = ordercollation
|purpose= Allow individual collations, make case -insensitive sorting possible
}}
 
Line 112 ⟶ 113:
You may want to try <code>latin1_swedish_ci</code> or other collation mapping table names as well.
 
If you use a name for the first time, you should make sure that it is correctly spelt. Otherwise, you will see a SQL error message.
 
For case insensitivity during the ''selection'' of articles, see {{dpl3|ignorecase}}.
Line 118 ⟶ 119:
==References==
<references />
[[Category:Primary Module]]
 
<!-- Extension prefix in other languages:
 
[[de:Erweiterung:{{subst:BASEPAGENAME}}]]
[[es:Extensión:{{subst:BASEPAGENAME}}]]
[[fr:Extension:{{subst:BASEPAGENAME}}]]
[[it:Estensione:{{subst:BASEPAGENAME}}]]
[[nl:Uitbreiding:{{subst:BASEPAGENAME}}]]
[[pl:Rozszerzenie:{{subst:BASEPAGENAME}}]]
[[pt:Extensão:{{subst:BASEPAGENAME}}]]
[[ru:Расширение:{{subst:BASEPAGENAME}}]]
[[zh:扩展:{{subst:BASEPAGENAME}}]]
-->
Anonymous user