Template:Tree list/doc
{{#ifeq:doc |doc
|
{{#ifeq:show |show
| Template:Mbox }}{{#if: | | {{#ifexist:Template:Tree list | [[Category:{{#switch:Template |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | }} }} | }}
Template:When on basepage This family of templates can be used to create a properly structured and accessible tree. This can be used to display family trees, succession to thrones, etc. They comprise:
<templatestyles src="Tree list/styles.css" />- {{Tree list}}
- {{Tree list/end}}
- {{Tree list/branching}}
Contents
Syntax[edit]
Start and finish of the tree[edit]
The tree must include a start and finish, using the templates {{Tree list}} and {{Tree list/end}} respectively. The tree is essentially a series of nested lists built with the asterisk *.
{{Tree list}}
* Here goes the content of the tree using asterisks.
{{Tree list/end}}
The branches of the tree[edit]
Each branch of the tree is built using nested lists:
{{Tree list}}
* A first level branch
** A second level branch
*** A third level branch
{{Tree list/end}}
produces
<templatestyles src="Tree list/styles.css" />- A first level branch
- A second level branch
- A third level branch
- A second level branch
Unlabelled branches[edit]
An unlabelled branch may be formed by using the {{Tree list/branching}} template.
{{Tree list}}
* A first level branch
** {{Tree list/branching}}
*** A third level branch
*** Another third level branch
*** The final third level branch
** A second level branch
** {{Tree list/branching}} <!--- This branch ends the second level --->
*** A third level branch
*** The final third level branch
{{Tree list/end}}
produces the following:
<templatestyles src="Tree list/styles.css" />- A first level branch
-
- A third level branch
- Another third level branch
- The final third level branch
- A second level branch
-
- A third level branch
- The final third level branch
Collapse[edit]
To collapse a tree place {{{{#if: |subst:}}Hidden begin{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||{{{12}}}}}{{#if: ||{{{13}}}}}{{#if: ||{{{14}}}}}{{#if: ||{{{15}}}}}{{#if: ||{{{16}}}}}{{#if: ||{{{17}}}}}{{#if: ||{{{18}}}}}{{#if: ||{{{19}}}}}{{#if: ||{{{20}}}}}{{#if: ||...}}}} before {{{{#if: |subst:}}Tree list{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||{{{12}}}}}{{#if: ||{{{13}}}}}{{#if: ||{{{14}}}}}{{#if: ||{{{15}}}}}{{#if: ||{{{16}}}}}{{#if: ||{{{17}}}}}{{#if: ||{{{18}}}}}{{#if: ||{{{19}}}}}{{#if: ||{{{20}}}}}{{#if: ||...}}}} and enclose {{{{#if: |subst:}}Tree list/end{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||{{{12}}}}}{{#if: ||{{{13}}}}}{{#if: ||{{{14}}}}}{{#if: ||{{{15}}}}}{{#if: ||{{{16}}}}}{{#if: ||{{{17}}}}}{{#if: ||{{{18}}}}}{{#if: ||{{{19}}}}}{{#if: ||{{{20}}}}}{{#if: ||...}}}} with {{{{#if: |subst:}}Hidden end{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||{{{12}}}}}{{#if: ||{{{13}}}}}{{#if: ||{{{14}}}}}{{#if: ||{{{15}}}}}{{#if: ||{{{16}}}}}{{#if: ||{{{17}}}}}{{#if: ||{{{18}}}}}{{#if: ||{{{19}}}}}{{#if: ||{{{20}}}}}{{#if: ||...}}}}. {{{{#if: |subst:}}Hidden begin{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||{{{12}}}}}{{#if: ||{{{13}}}}}{{#if: ||{{{14}}}}}{{#if: ||{{{15}}}}}{{#if: ||{{{16}}}}}{{#if: ||{{{17}}}}}{{#if: ||{{{18}}}}}{{#if: ||{{{19}}}}}{{#if: ||{{{20}}}}}{{#if: ||...}}}} default to just a show link on the right, but it takes a number of parameters see the template's documentation. In this case:
|border=1px #aaa solid — a solid border around the tree |title=Demonstration tree — a suitable name for the tree |ta1=center – center the title= name
{{hidden begin|border=1px #aaa solid|title=Demonstration tree|ta1=center}}
{{Tree list}}
* A first level branch
** {{Tree list/branching}}
*** A third level branch
*** Another third level branch
*** The final third level branch
** A second level branch
** {{Tree list/branching}} <!--- This branch ends the second level --->
*** A third level branch
*** The final third level branch
{{Tree list/end}}
{{Hidden end}}
- A first level branch
-
- A third level branch
- Another third level branch
- The final third level branch
- A second level branch
-
- A third level branch
- The final third level branch
Examples[edit]
A family tree[edit]
Code : <source lang="moin">
- 15px (1) Henry VII (1457 - 1509)
- Arthur, Prince of Wales (1486 - 1502)
- Margaret, Queen of Scots (1489 - 1541)
- James, Duke of Rothesay (1507 - 1508)
- Arthur, Duke of Rothesay (1509 - 1510)
- 15px James V of Scotland (1512 - 1542)
- 15px Mary, Queen of Scots (1542 - 1587)
- 15px 15px (7) James VI of Scotland and I of England (1566 - 1625)
- Template:Tree list/final branchFrom whom succeeding English, Scottish and British monarchs are descended.
- 15px 15px (7) James VI of Scotland and I of England (1566 - 1625)
- 15px Mary, Queen of Scots (1542 - 1587)
- Alexander Stewart, Duke of Ross (1514 - 1515)
- Margaret Douglas, Countess of Lennox (1515 - 1578)
- 15px (2) Henry VIII of England (1491 - 1547)
- Henry, Duke of Cornwall (1511 - 1511)
- 15px (5) Mary I of England (1516 - 1558)
- 15px (6) Elizabeth I of England (1533 - 1603)
- 15px (3) Edward VI of England
- Elizabeth Tudor (1492 - 1495)
- Mary, Queen of France (1496 - 1533)
- Henry Brandon (1516 - 1522)
- Frances Grey, Duchess of Suffolk (1517 - 1547)
- 15px (4) Lady Jane Grey (1536 - 1553)
- Catherine Seymour, Countess of Hertford (1540 - 1568)
- Lady Mary Keyes (1545 - 1578)
- Elizabeth Stokes (1555 - 1556)
- Eleanor Clifford, Countess of Cumberland (1519 - 1547)
- Template:Tree list/final branchFrom whom are descended the Earls of Derby
- Henry Brandon, 1st Earl of Lincoln (1523 - 1534)
- Edmund Tudor, Duke of Somerset (1499 - 1500)
- Katherine Tudor (1503 - 1503)
</source>
which gives
- 15px (1) Henry VII (1457 - 1509)
- Arthur, Prince of Wales (1486 - 1502)
- Margaret, Queen of Scots (1489 - 1541)
- James, Duke of Rothesay (1507 - 1508)
- Arthur, Duke of Rothesay (1509 - 1510)
- 15px James V of Scotland (1512 - 1542)
- 15px Mary, Queen of Scots (1542 - 1587)
- 15px 15px (7) James VI of Scotland and I of England (1566 - 1625)
- From whom succeeding English, Scottish and British monarchs are descended.
- 15px 15px (7) James VI of Scotland and I of England (1566 - 1625)
- 15px Mary, Queen of Scots (1542 - 1587)
- Alexander Stewart, Duke of Ross (1514 - 1515)
- Margaret Douglas, Countess of Lennox (1515 - 1578)
- 15px (2) Henry VIII of England (1491 - 1547)
- Henry, Duke of Cornwall (1511 - 1511)
- 15px (5) Mary I of England (1516 - 1558)
- 15px (6) Elizabeth I of England (1533 - 1603)
- 15px (3) Edward VI of England
- Elizabeth Tudor (1492 - 1495)
- Mary, Queen of France (1496 - 1533)
- Henry Brandon (1516 - 1522)
- Frances Grey, Duchess of Suffolk (1517 - 1547)
- 15px (4) Lady Jane Grey (1536 - 1553)
- Catherine Seymour, Countess of Hertford (1540 - 1568)
- Lady Mary Keyes (1545 - 1578)
- Elizabeth Stokes (1555 - 1556)
- Eleanor Clifford, Countess of Cumberland (1519 - 1547)
- From whom are descended the Earls of Derby
- Henry Brandon, 1st Earl of Lincoln (1523 - 1534)
- Edmund Tudor, Duke of Somerset (1499 - 1500)
- Katherine Tudor (1503 - 1503)
An ancestry tree[edit]
Ahnentafel style trees can be can be displayed using this template, but usually for less than 6 generations the customised Ahnentafel templates are clearer (see Template:Ahnentafel/doc). There is also an ahnentafel template ({{Ahnentafel-tree}}), that is based on this one, that makes construction this tree simpler.
<source lang="moin">
- 1. Prince William, Duke of Cambridge(born 21 June 1982)
- 2. Charles, Prince of Wales (born 14 November 1948)
- 4. Prince Philip of Greece and Denmark(born 10 June 1921)
- 8. Prince Andrew of Greece and Denmark (20 January 1882 – 3 December 1944)
- 9. Princess Alice of Battenberg (25 February 1885 – 5 December 1969)
- 5. Elizabeth II of the United Kingdom (born 21 April 1926)
- 10. George VI of the United Kingdom (14 December 1895 – 6 February 1952)
- 11. Lady Elizabeth Bowes-Lyon (4 August 1900 – 30 March 2002)
- 4. Prince Philip of Greece and Denmark(born 10 June 1921)
- 3. Lady Diana Spencer (1 July 1961 – 31 August 1997)
- 6. John Spencer, 8th Earl Spencer (born 21 April 1926)
- 12. Albert Spencer, 7th Earl Spencer (23 May 1892 – 9 June 1975)
- 13. Lady Cynthia Hamilton (16 August 1897 – 4 December 1972)
- 7. The Honourable Frances Roche (20 January 1936 – 3 June 2004)
- 14. Maurice Roche, 4th Baron Fermoy (15 May 1885 – 8 July 1955)
- 15. Ruth Gill (2 October 1908 – 6 July 1993)
- 6. John Spencer, 8th Earl Spencer (born 21 April 1926)
- 2. Charles, Prince of Wales (born 14 November 1948)
</source>
- 1. Prince William, Duke of Cambridge (born 21 June 1982)
- 2. Charles, Prince of Wales (born 14 November 1948)
- 4. Prince Philip of Greece and Denmark(born 10 June 1921)
- 8. Prince Andrew of Greece and Denmark (20 January 1882 – 3 December 1944)
- 9. Princess Alice of Battenberg (25 February 1885 – 5 December 1969)
- 5. Elizabeth II of the United Kingdom (born 21 April 1926)
- 10. George VI of the United Kingdom (14 December 1895 – 6 February 1952)
- 11. Lady Elizabeth Bowes-Lyon (4 August 1900 – 30 March 2002)
- 4. Prince Philip of Greece and Denmark(born 10 June 1921)
- 3. Lady Diana Spencer (1 July 1961 – 31 August 1997)
- 6. John Spencer, 8th Earl Spencer (born 21 April 1926)
- 12. Albert Spencer, 7th Earl Spencer (23 May 1892 – 9 June 1975)
- 13. Lady Cynthia Hamilton (16 August 1897 – 4 December 1972)
- 7. The Honourable Frances Roche (20 January 1936 – 3 June 2004)
- 14. Maurice Roche, 4th Baron Fermoy (15 May 1885 – 8 July 1955)
- 15. Ruth Gill (2 October 1908 – 6 July 1993)
- 6. John Spencer, 8th Earl Spencer (born 21 April 1926)
- 2. Charles, Prince of Wales (born 14 November 1948)
A cladogram[edit]
<source lang="moin">
- Tetrapoda
-
- Many extinct groups such as the Eucritta
- Lissamphibia Whose ancestors of the current amphibians
-
- Many extinct groups reminiscent of amphibians with more or less pronounced reptilian characteristics such as Eoherpetontidae, the Embolomeri, the Tokosauridae, Chroniosuchidae, Gephyrostegidae, Solenodonsauridae, Seymouriamorpha, Westlothiana, Lepospondyli
- Cotylosauria
- Amniota, Originally all "Reptilian"
- Other extinct sibling taxa like Diadectomorpha or Tseajaiidae are close enough to reptiles
</source>
- Tetrapoda
-
- Many extinct groups such as the Eucritta
- Lissamphibia Whose ancestors of the current amphibians
-
- Many extinct groups reminiscent of amphibians with more or less pronounced reptilian characteristics such as Eoherpetontidae, the Embolomeri, the Tokosauridae, Chroniosuchidae, Gephyrostegidae, Solenodonsauridae, Seymouriamorpha, Westlothiana, Lepospondyli
- Cotylosauria
- Amniota, Originally all "Reptilian"
- Other extinct sibling taxa like Diadectomorpha or Tseajaiidae are close enough to reptiles
See also[edit]
- Wikipedia:Family trees
{{{{#if: |subst:}}Chart{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||{{{12}}}}}{{#if: ||{{{13}}}}}{{#if: ||{{{14}}}}}{{#if: ||{{{15}}}}}{{#if: ||{{{16}}}}}{{#if: ||{{{17}}}}}{{#if: ||{{{18}}}}}{{#if: ||{{{19}}}}}{{#if: ||{{{20}}}}}{{#if: ||...}}}}— This template produces one row in a "family tree"-like chart consisting of boxes and connecting lines{{{{#if: |subst:}}Ahnentafel{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||{{{12}}}}}{{#if: ||{{{13}}}}}{{#if: ||{{{14}}}}}{{#if: ||{{{15}}}}}{{#if: ||{{{16}}}}}{{#if: ||{{{17}}}}}{{#if: ||{{{18}}}}}{{#if: ||{{{19}}}}}{{#if: ||{{{20}}}}}{{#if: ||...}}}}— This template takes genealogical data in the form of an ahnentafel and presents it as a graphical ancestry tree{{{{#if: |subst:}}ahnentafel-tree{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||{{{12}}}}}{{#if: ||{{{13}}}}}{{#if: ||{{{14}}}}}{{#if: ||{{{15}}}}}{{#if: ||{{{16}}}}}{{#if: ||{{{17}}}}}{{#if: ||{{{18}}}}}{{#if: ||{{{19}}}}}{{#if: ||{{{20}}}}}{{#if: ||...}}}}uses{{{{#if: |subst:}}Tree list{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||{{{12}}}}}{{#if: ||{{{13}}}}}{{#if: ||{{{14}}}}}{{#if: ||{{{15}}}}}{{#if: ||{{{16}}}}}{{#if: ||{{{17}}}}}{{#if: ||{{{18}}}}}{{#if: ||{{{19}}}}}{{#if: ||{{{20}}}}}{{#if: ||...}}}}and will handle up to an ahnentafel of 511 places (9 generations), but will also display as little as one generation.