Help:DPL Examples/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).
<DPL> category=African Union member states includepage={Infobox Country or territory} dpl mode=userformat addpagecounter=true listseparators=\n{|class="wikitable sortable" \n!Country \n!Area \n!Population \n|#hits\n|-,\n|-\n|[[#%PAGE%|%PAGE%]]\n,\n|align=right|%COUNT%\n,\n|} secseparators=\n| </DPL>
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],#Culture[800],{Infobox Country or territory} dpl2 mode=userformat listseparators=\n{|class="wikitable sortable" \n!Country \n!History \n!Culture \n!Area &<br/>Population \n|-,\n|-\n|valign=top|\n=====[[%PAGE%]]=====\n,,\n|} secseparators=\n| </DPL>