Difference between revisions of "DPL Example 023"
From FollowTheScore
Line 13: | Line 13: | ||
|table=class=sortable wikitable,-,Capital,Country,Official Name | |table=class=sortable wikitable,-,Capital,Country,Official Name | ||
}} | }} | ||
− | {{ | + | {{Sort Table By Column 1}} |
</nowiki></pre> | </nowiki></pre> | ||
Line 25: | Line 25: | ||
|table=class=sortable wikitable,-,Capital,Country,Official Name | |table=class=sortable wikitable,-,Capital,Country,Official Name | ||
}} | }} | ||
− | {{ | + | {{Sort Table By Column 1}} |
Revision as of 08:06, 20 June 2009
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}.listByCapital |table=class=sortable wikitable,-,Capital,Country,Official Name }} {{Sort Table By Column 1}}
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 |