Difference between revisions of "Example 2"

From FollowTheScore
Jump to: navigation, search
Line 34: Line 34:
 
   mode=userformat
 
   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|}
 
   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|,,
+
   secseparators=\n|
 
</DPL>
 
</DPL>
 
</nowiki></pre>
 
</nowiki></pre>
Line 44: Line 44:
 
   mode=userformat
 
   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|}
 
   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|,,
+
   secseparators=\n|
 
</DPL>
 
</DPL>
  
 
<references/>
 
<references/>

Revision as of 12:33, 25 February 2007

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|
</DPL>


Country History Culture Area &
Population
Cameroon
Main article: History of Cameroon

Pre-colonial period

Joseph Merrick, a Jamaican Baptist missionary, at an Isubu funeral in 1845

Archaeological finds show that humankind has <linkedimage>page=Cameroon#History img=Image:pointing.hand.gif </linkedimage>

Baka dancers in the East Province
Main article: Culture of Cameroon
Holidays
Date English Name
1 January New Year's Day
11 February National Youth Day
1 May Labour Day
20 May National Day
15 August Assumption
25 December Christmas<ref>West 86.</ref>

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²


16,323,000

Nigeria
Main article: History of Nigeria
See also: Nigerian military juntas of 1966-1979 and 1983-1998

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>

Main article: Culture of Nigeria

Literature

See also: Nigerian 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²


133,530,0001

Somalia
Main article: History of Somalia

Pre-colonial times

Somalia 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>

Main article: Culture of Somalia

637,657 km²


8,228,000

Sudan
Statue of a Nubian king, Sudan.
Main article: History of Sudan

Early history of Sudan

Three ancient kings of the Kushite kingdoms <linkedimage>page=Sudan#History img=Image:pointing.hand.gif </linkedimage>

A man falls into a trance during a Sufi ceremony in Khartoum.

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²


36,992,490

<references/>