Anonymous user
Controlling output order: Difference between revisions
no edit summary
m (Alianin moved page DPL:Parameters: Controlling Output Order to Extension:DPL3/Parameters: Controlling output order without leaving a redirect: Changing namespaces.) |
No edit summary |
||
Line 1:
{{DPL
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 [[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
But there is another way: Create a ''sortable wiki table'' (using the [[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 21:
if (cell.innerHTML.indexOf("sortheader") < 0) { ... place the original code line here ... }
▲===ordermethod===
{{DPL Parameter
Line 71 ⟶ 67:
This list will output pages that have <nowiki>[[Category:Africa]]</nowiki> showing most recently edited articles at the top.
{{DPL Parameter
Line 100 ⟶ 96:
In addition the edit date will be presented with each article.
▲===ordercollation===
{{DPL Parameter
|