DPL Example 023
From FollowTheScore
back to list of examples
Create a SORTED table of articles based on template parameters
This is basically the same as DPL Example 001.
DPL goes through all pages and initially builds an alphabetically sorted list of matching articles. We output the columns in different order (just for convenience) and then we use a small piece of javascript code to resort the table by column one. As we must insert the link to the article at column position two, we need an phantom template Template:Country.listByCapital to format the output of each line.
{{#dpl: |category=Fictitious country |include={Country}:capital:name |table=,,Capital,Name }}
The above DPL command produces the following output:
Capital | Country | Official Name |
---|---|---|
DPL Example 007 main page 1 | ||
Bamitogoo | Nigunda | Republic of Nigunda |
Bamitogoo Test | Nigunda Test | Republic of Nigunda Test |
Aaaabququque | Somango | Somango Island |