Jump to content
This wiki has been automatically closed because there have been no edits or log actions made within the last 60 days. If you are a user (who is not the bureaucrat) that wishes for this wiki to be reopened, please request that at Requests for reopening wikis. If this wiki is not reopened within 6 months it may be deleted. Note: If you are a bureaucrat on this wiki, you can go to Special:ManageWiki and uncheck the "Closed" box to reopen it.

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 Manualmanual|section=Parameters|subsection=Controlling Outputoutput Orderorder}}
 
DPLDPL3 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 [[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 analyseanalyze all articles before finding those parameter values.
 
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===
 
__TOC__
 
 
===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.
 
===order===
 
{{DPL Parameter
Line 100 ⟶ 96:
In addition the edit date will be presented with each article.
 
===ordercollation===
 
===ordercollation===
 
{{DPL Parameter
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.