Template:Tree list/doc

From Dothack Wikipedia
Jump to navigation Jump to search

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:

Syntax

Start and finish of the tree

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

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

  • A first level branch
    • A second level branch
      • A third level branch

Unlabelled branches

An unlabelled branch may be formed by using the {{Tree list/branching}} template.

<syntaxhighlight lang="tid">
  • 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
</syntaxhighlight>

produces the following:

  • 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

To collapse a tree place Lua error: Internal error: The interpreter has terminated with signal "11". before Lua error: Internal error: The interpreter has terminated with signal "11". and enclose Lua error: Internal error: The interpreter has terminated with signal "11". with Lua error: Internal error: The interpreter has terminated with signal "11".. Lua error: Internal error: The interpreter has terminated with signal "11". 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 

<syntaxhighlight lang="tid">

Demonstration tree
  • 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

</syntaxhighlight>

Demonstration tree
  • 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


If the parameter |expanded=on is added to Lua error: Internal error: The interpreter has terminated with signal "11". then the box will be drawn expanded rather than the default, which is to collapse the tree.

Examples

A family tree

Code : <syntaxhighlight lang="moin">

A family tree (descendants of Henry VII of England)

</syntaxhighlight>

which gives

A family tree (descendants of Henry VII of England)

An ancestry tree

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.

<syntaxhighlight lang="moin">

Ancestry tree of Prince William, Duke of Cambridge

</syntaxhighlight>

Ancestry tree of Prince William, Duke of Cambridge

A cladogram

<syntaxhighlight lang="moin">

A cladogram

</syntaxhighlight>

A cladogram

See also

  • Wikipedia:Family trees
  • Lua error: Internal error: The interpreter has terminated with signal "11". — This template produces one row in a "family tree"-like chart consisting of boxes and connecting lines
  • Lua error: Internal error: The interpreter has terminated with signal "11". — This template takes genealogical data in the form of an ahnentafel and presents it as a graphical ancestry tree
  • Lua error: Internal error: The interpreter has terminated with signal "11". uses Lua error: Internal error: The interpreter has terminated with signal "11". and will handle up to an ahnentafel of 511 places (9 generations), but will also display as little as one generation.