Example 2
This example for the use of DPL is based on a copy of articles from the English wikipedia.
First we create a small table with some figures (taken from template calls of the original pages). We also add some meta data on popularity (hit rates of the articles).
{{Sortable Tables}} <DPL> category=African Union member states includepage={Infobox Country or territory} dpl mode=userformat addpagecounter=true listseparators=\n{|class=sortablewikitable id=123 \n!Country \n!Area \n!Population \n|#hits\n|-,\n|-\n|[[#%PAGE%|%PAGE%]]\n,\n|align=right|%COUNT%\n,\n|} secseparators=\n| </DPL>
<javascript src="sorttable"/>
Country | Area | Population | #hits |
---|---|---|---|
Cameroon | 475,442 | 16,323,000 | %COUNT% |
Nigeria | 923,768 | 133,530,0001 | %COUNT% |
Somalia | 637,657 | 8,228,000 | %COUNT% |
Sudan | 2,505,813 | 36,992,490 | %COUNT% |
Note that the country names in the small table link to the corresponding entry in the big table. In the History column of the big table we define a small image to be used as a "..more.." symbol; in the column on Religion we use the default (..→) We cut off contents at a convenient size in both columns. The last column contains some significant figures for each country. Its contents is formated in a separate template which replaces the original template during the creation of the report.
<DPL> resultsheader=__NOTOC__ __NOEDITSECTION__ category=African Union member states includepage=#History[350 img=pointing.hand.gif],#Culture[800],{Infobox Country or territory} dpl2 mode=userformat listseparators=\n{|class=sortablewikitable id=123 \n!Country \n!History \n!Culture \n!Area &<br>Population \n|-,\n|-\n|valign=top|\n=====[[%PAGE%]]=====\n,,\n|} secseparators=\n|,,\n|,,\n|,, </DPL>
Country | History | Culture | Area & Population | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Cameroon |
Pre-colonial periodArchaeological finds show that humankind has <linkedimage>page=Cameroon#History img=Image:pointing.hand.gif </linkedimage> |
Each of Cameroon's ethnic groups has its own unique cultural forms. Typical celebrations include births, deaths, planting, harvesting, and religious events. ..→ |
475,442 km²
| ||||||||||||||||
Nigeria |
More than 2,000 years ago. the Nok people in central Nigeria were producing sculptures. <linkedimage>page=Nigeria#History img=Image:pointing.hand.gif </linkedimage> |
Literature
Nigeria has a rich literary history, both prior to British imperialism and after, as Nigerians have authored several works of post-colonial literature in the English language. The second African Nobel Laureate, Wole Soyinka is Nigeria's best-known writer and playwright. Other Nigerian writers and poets who are well known on the international stage include Chinua Achebe, John Pepper Clark, Ben Okri, Sonny Oti and Ken Saro Wiwa who was executed in ..→ |
923,768 km²
| ||||||||||||||||
Somalia |
Pre-colonial timesSomalia has been continuously inhabited by numerous and varied ethnic groups, some of Italian or Yemenite ancestry, but the majority are Somalis, for the last 2,500 years. In late antiquity, the northern part of <linkedimage>page=Somalia#History img=Image:pointing.hand.gif </linkedimage> |
|
637,657 km²
| ||||||||||||||||
Sudan |
Early history of SudanThree ancient kings of the Kushite kingdoms <linkedimage>page=Sudan#History img=Image:pointing.hand.gif </linkedimage> |
Sudan's largest Christian denominations are the Roman Catholic Church, the Episcopal Church of the Sudan, the Presbyterian Church in the Sudan and the Coptic Orthodox Church. |
2,505,813 km²
|
<references/>