Template:Tree list/doc: Difference between revisions

m
no edit summary
mp>Cedar101
m (→‎Collapse: syntaxhighlight)
 
mNo edit summary
Tag: 2017 source edit
 
(One intermediate revision by one other user not shown)
Line 12: Line 12:
The tree must include a start and finish, using the templates {{tl|Tree list}} and {{tl|Tree list/end}} respectively. The tree is essentially a series of nested lists built with the asterisk *.
The tree must include a start and finish, using the templates {{tl|Tree list}} and {{tl|Tree list/end}} respectively. The tree is essentially a series of nested lists built with the asterisk *.


<pre>
<syntaxhighlight lang="wikitext">
{{Tree list}}
{{Tree list}}
* Here goes the content of the tree using asterisks.
* Here goes the content of the tree using asterisks.
{{Tree list/end}}
{{Tree list/end}}
</pre>
</syntaxhighlight>


=== The branches of the tree ===
=== The branches of the tree ===
Each branch of the tree is built using nested lists:
Each branch of the tree is built using nested lists:
<pre>{{Tree list}}
<syntaxhighlight lang="wikitext">
{{Tree list}}
* A first level branch
* A first level branch
** A second level branch
** A second level branch
*** A third level branch
*** A third level branch
{{Tree list/end}}</pre>
{{Tree list/end}}
</syntaxhighlight>
produces
produces
{{Tree list}}
{{Tree list}}
Line 34: Line 36:
=== Unlabelled branches ===
=== Unlabelled branches ===
An unlabelled branch may be formed by using the {{tl|Tree list/branching}} template.
An unlabelled branch may be formed by using the {{tl|Tree list/branching}} template.
<syntaxhighlight lang="tid">{{Tree list}}
<syntaxhighlight lang="wikitext">{{Tree list}}
* A first level branch
* A first level branch
** {{Tree list/branching}}
** {{Tree list/branching}}
Line 64: Line 66:
  |ta1=center – center the title= name  
  |ta1=center – center the title= name  


<syntaxhighlight lang="tid">
<syntaxhighlight lang="wikitext">
{{hidden begin|border=1px  #aaa solid|title=Demonstration tree|ta1=center}}
{{hidden begin|border=1px  #aaa solid|title=Demonstration tree|ta1=center}}
{{Tree list}}
{{Tree list}}
Line 93: Line 95:
{{Tree list/end}}
{{Tree list/end}}
{{Hidden end}}
{{Hidden end}}


If the parameter <code>|expanded=on</code> is added to {{tlx|hidden begin}} then the box will be drawn expanded rather than the default, which is to collapse the tree.
If the parameter <code>|expanded=on</code> is added to {{tlx|hidden begin}} then the box will be drawn expanded rather than the default, which is to collapse the tree.
Line 100: Line 101:
===A family tree ===
===A family tree ===
'''Code :'''
'''Code :'''
<syntaxhighlight lang="moin">
<syntaxhighlight lang="wikitext">
{{hidden begin|border=1px  #aaa solid|title=A family tree (descendants of Henry VII of England)|ta1=center|expanded=on}}
{{hidden begin|border=1px  #aaa solid|title=A family tree (descendants of Henry VII of England)|ta1=center|expanded=on}}
{{Tree list}}
{{Tree list}}
Line 111: Line 112:
****[[Image:Simple silver crown.svg|15px]] [[Mary, Queen of Scots]] (1542 - 1587)
****[[Image:Simple silver crown.svg|15px]] [[Mary, Queen of Scots]] (1542 - 1587)
*****[[Image:Simple silver crown.svg|15px]] [[Image:Simple gold crown.svg|15px]] '''(7)''' [[James VI and I|James VI of Scotland and I of England]] (1566 - 1625)
*****[[Image:Simple silver crown.svg|15px]] [[Image:Simple gold crown.svg|15px]] '''(7)''' [[James VI and I|James VI of Scotland and I of England]] (1566 - 1625)
******{{Tree list/final branch}}''From whom succeeding English, Scottish and British monarchs are descended.''
******''From whom succeeding English, Scottish and British monarchs are descended.''
***[[Alexander Stewart, Duke of Ross]] (1514 - 1515)
***[[Alexander Stewart, Duke of Ross]] (1514 - 1515)
***[[Margaret Douglas|Margaret Douglas, Countess of Lennox]] (1515 - 1578)
***[[Margaret Douglas|Margaret Douglas, Countess of Lennox]] (1515 - 1578)
Line 128: Line 129:
****Elizabeth Stokes (1555 - 1556)
****Elizabeth Stokes (1555 - 1556)
***[[Eleanor Clifford, Countess of Cumberland]] (1519 - 1547)
***[[Eleanor Clifford, Countess of Cumberland]] (1519 - 1547)
****{{Tree list/final branch}}''From whom are descended the [[Earl of Derby|Earls of Derby]]''
****''From whom are descended the [[Earl of Derby|Earls of Derby]]''
***[[Henry Brandon, 1st Earl of Lincoln]] (1523 - 1534)
***[[Henry Brandon, 1st Earl of Lincoln]] (1523 - 1534)
**[[Edmund Tudor, Duke of Somerset]] (1499 - 1500)  
**[[Edmund Tudor, Duke of Somerset]] (1499 - 1500)  
Line 174: Line 175:
[[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 ({{tl|Ahnentafel-tree}}), that is based on this one, that makes construction this tree simpler.
[[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 ({{tl|Ahnentafel-tree}}), that is based on this one, that makes construction this tree simpler.


<syntaxhighlight lang="moin">
<syntaxhighlight lang="wikitext">
{{hidden begin|border=1px  #aaa solid|title=Ancestry tree of Prince William, Duke of Cambridge|ta1=center|expanded=on}}
{{hidden begin|border=1px  #aaa solid|title=Ancestry tree of Prince William, Duke of Cambridge|ta1=center|expanded=on}}
{{Tree list}}
{{Tree list}}
*1. '''[[Prince William, Duke of Cambridge]]'''(born 21 June 1982)
*1. '''[[William, Prince of Wales]]''' (born 21 June 1982)
**2. [[Charles, Prince of Wales]] (born 14 November 1948)
**2. [[Charles III|Charles III of the United Kingdom]] (born 14 November 1948)
***4. [[Prince Philip, Duke of Edinburgh|Prince Philip of Greece and Denmark]](born 10 June 1921)
***4. [[Prince Philip, Duke of Edinburgh|Prince Philip of Greece and Denmark]] (10 June 1921 – 9 April 2021)
****8. [[Prince Andrew of Greece and Denmark]] (20 January 1882 – 3 December 1944)
****8. [[Prince Andrew of Greece and Denmark]] (20 January 1882 – 3 December 1944)
****9. [[Princess Alice of Battenberg]] (25 February 1885 – 5 December 1969)
****9. [[Princess Alice of Battenberg]] (25 February 1885 – 5 December 1969)
***5. [[Elizabeth II|Elizabeth II of the United Kingdom]] (born 21 April 1926)
***5. [[Elizabeth II|Elizabeth II of the United Kingdom]] (21 April 1926 – 8 September 2022)
****10. [[George VI|George VI of the United Kingdom]] (14 December 1895 – 6 February 1952)
****10. [[George VI|George VI of the United Kingdom]] (14 December 1895 – 6 February 1952)
****11. [[Queen Elizabeth The Queen Mother|Lady Elizabeth Bowes-Lyon]] (4 August 1900 – 30 March 2002)
****11. [[Queen Elizabeth The Queen Mother|Lady Elizabeth Bowes-Lyon]] (4 August 1900 – 30 March 2002)
**3. [[Diana, Princess of Wales|Lady Diana Spencer]]  (1 July 1961 – 31 August 1997)
**3. [[Diana, Princess of Wales|Lady Diana Spencer]]  (1 July 1961 – 31 August 1997)
***6. [[John Spencer, 8th Earl Spencer]] (born 21 April 1926)
***6. [[John Spencer, 8th Earl Spencer]] (21 April 1926 – 29 March 1992)
****12. [[Albert Spencer, 7th Earl Spencer]] (23 May 1892 – 9 June 1975)
****12. [[Albert Spencer, 7th Earl Spencer]] (23 May 1892 – 9 June 1975)
****13. [[Cynthia Spencer, Countess Spencer|Lady Cynthia Hamilton]]  (16 August 1897 – 4 December 1972)
****13. [[Cynthia Spencer, Countess Spencer|Lady Cynthia Hamilton]]  (16 August 1897 – 4 December 1972)
***7. [[Frances Shand Kydd|The Honourable Frances Roche]] (20 January 1936 – 3 June 2004)
***7. [[Frances Shand Kydd|The Honourable Frances Roche]] (20 January 1936 – 3 June 2004)
Line 198: Line 199:
{{hidden begin|border=1px  #aaa solid|title=Ancestry tree of Prince William, Duke of Cambridge|ta1=center|expanded=on}}
{{hidden begin|border=1px  #aaa solid|title=Ancestry tree of Prince William, Duke of Cambridge|ta1=center|expanded=on}}
{{Tree list}}
{{Tree list}}
*1. '''[[Prince William, Duke of Cambridge]]''' (born 21 June 1982)
*1. '''[[William, Prince of Wales]]''' (born 21 June 1982)
**2. [[Charles, Prince of Wales]] (born 14 November 1948)
**2. [[Charles III|Charles III of the United Kingdom]] (born 14 November 1948)
***4. [[Prince Philip, Duke of Edinburgh|Prince Philip of Greece and Denmark]](born 10 June 1921)
***4. [[Prince Philip, Duke of Edinburgh|Prince Philip of Greece and Denmark]] (10 June 1921 – 9 April 2021)
****8. [[Prince Andrew of Greece and Denmark]] (20 January 1882 – 3 December 1944)
****8. [[Prince Andrew of Greece and Denmark]] (20 January 1882 – 3 December 1944)
****9. [[Princess Alice of Battenberg]] (25 February 1885 – 5 December 1969)
****9. [[Princess Alice of Battenberg]] (25 February 1885 – 5 December 1969)
***5. [[Elizabeth II|Elizabeth II of the United Kingdom]] (born 21 April 1926)
***5. [[Elizabeth II|Elizabeth II of the United Kingdom]] (21 April 1926 – 8 September 2022)
****10. [[George VI|George VI of the United Kingdom]] (14 December 1895 – 6 February 1952)
****10. [[George VI|George VI of the United Kingdom]] (14 December 1895 – 6 February 1952)
****11. [[Queen Elizabeth The Queen Mother|Lady Elizabeth Bowes-Lyon]] (4 August 1900 – 30 March 2002)
****11. [[Queen Elizabeth The Queen Mother|Lady Elizabeth Bowes-Lyon]] (4 August 1900 – 30 March 2002)
**3. [[Diana, Princess of Wales|Lady Diana Spencer]]  (1 July 1961 – 31 August 1997)
**3. [[Diana, Princess of Wales|Lady Diana Spencer]]  (1 July 1961 – 31 August 1997)
***6. [[John Spencer, 8th Earl Spencer]] (born 21 April 1926)
***6. [[John Spencer, 8th Earl Spencer]] (21 April 1926 – 29 March 1992)
****12. [[Albert Spencer, 7th Earl Spencer]]  (23 May 1892 – 9 June 1975)
****12. [[Albert Spencer, 7th Earl Spencer]]  (23 May 1892 – 9 June 1975)
****13. [[Cynthia Spencer, Countess Spencer|Lady Cynthia Hamilton]]  (16 August 1897 – 4 December 1972)
****13. [[Cynthia Spencer, Countess Spencer|Lady Cynthia Hamilton]]  (16 August 1897 – 4 December 1972)
Line 217: Line 218:


=== A cladogram ===
=== A cladogram ===
<syntaxhighlight lang="moin">
<syntaxhighlight lang="wikitext">
{{hidden begin|border=1px  #aaa solid|title=A cladogram|ta1=center|expanded=on}}
{{hidden begin|border=1px  #aaa solid|title=A cladogram|ta1=center|expanded=on}}
{{Tree list}}
{{Tree list}}
1,482

edits