DPL Example 003

From FollowTheScore
Revision as of 23:49, 7 March 2009 by Gero (talk | contribs)
Jump to: navigation, search

back to list of examples

Create a table of articles based on template parameters, apply individual formatting to columns

We show various template parameters.

<dpl>
  category=African Union member states
  nottitlematch=Sudan
  addpagecounter=true
  includepage ={Infobox Country or territory}:area:population_estimate
  format      =,,\n|align=right|²{#ifexpr:%COUNT%>2400¦<big>'''%COUNT%'''</big>¦%COUNT%}²,
  table       =,Country,Area,Population,#hits
  tablerow    =align=right|%%,align=right bgcolor=#ffffaa|<small>%%</small>,\n|align=right|%%
</dpl>

The above DPL command produces the following output:



|- |Cameroon |align=right|475,442 |align=right bgcolor=#ffffaa|16,323,000 |align=right|Expression error: Unrecognized punctuation character "%". |- |Nigeria |align=right|923,768 |align=right bgcolor=#ffffaa|133,530,0001 |align=right|Expression error: Unrecognized punctuation character "%". |- |Somalia |align=right|637,657 |align=right bgcolor=#ffffaa|8,228,000 |align=right|Expression error: Unrecognized punctuation character "%".