Template:Family tree

From Wikipedia, the free encyclopedia
  (Redirected from Template:Familytree)
Jump to: navigation, search
Documentation icon Template documentation[view] [edit] [history] [purge]

| type = move | text = When editing extremely large diagram with Family tree it is possible that you would be unable to submit the content due to Wikipedia:template limits. In that case please consider migrating your diagram to {{Chart}} which generates lower preprocessor node count. }}

This is a template for rendering simple family trees consisting of boxes and connecting lines based on an ASCII art-like syntax. The trees are displayed as HTML tables using CSS attributes, and may contain arbitrary wiki markup within the boxes.

Example usage

This code:

{{family tree/start |summary=I have a brother Joe and a little sister: my mom married my dad, and my dad's parents were Grandma and Grandpa; they had another child, Aunt Daisy.}}
{{family tree | | | | GMa |~|y|~| GPa | | GMa=Gladys|GPa=Sydney}}
{{family tree | | | | | | | |)|-|-|-|.| }}
{{family tree | | | MOM |y| DAD | |DAISY| MOM=Mom|DAD=Dad|DAISY=[[Aunt Daisy]]}}
{{family tree | |,|-|-|-|+|-|-|-|.| | | }}
{{family tree | JOE | | ME  | | SIS | | | JOE=My brother Joe|ME='''Me!'''|SIS=My little sister}}
{{family tree/end}}

Produces this:


 
 
 
Gladys
 
 
 
Sydney
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Mom
 
Dad
 
Aunt Daisy
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
My brother Joe
 
Me!
 
My little sister
 
 

Parameters

The |summary=text parameter of the {{family tree/start}} template should be used to describe the overall layout of the tree. This summary is for accessibility: it is read aloud to visually impaired readers who use screen readers, and is invisible to sighted readers.

The {{family tree}} template produces one row in a family tree table. The template accepts up to 80 unnamed parameters describing the contents of the table. Each parameter specifies a tile or a box.

  • Tiles are line drawing symbols consisting of horizontal and vertical lines and various corners and crossings thereof. Tiles are specified using single-character symbols that more or less approximate the shape of the tile in appearance. A special case of a tile is the empty tile, specified by a single space character. A table of supported tiles is given below.
Solid lines:
,
 
 
 
 
v
 
 
 
.
 
 
 
)
 
 
 
+
 
 
 
 
(
 
 
 
`
 
 
 
^
 
 
 
'
 
 
 
-
 
 
!
 
 
 
Dashed lines:
F
 
 
 
 
V
 
 
 
7
 
 
 
D
 
 
 
%
 
 
 
 
C
 
 
 
L
 
 
 
A
 
 
 
J
 
 
 
~
 
 
:
 
 
 
Mixed (1):
r
 
 
 
 
y
 
 
 
n
 
 
 
]
 
 
 
#
 
 
 
 
[
 
 
 
c
 
 
 
h
 
 
 
j
 
 
 
~
 
 
!
 
 
 
Mixed (2):
p
 
 
 
 
u
 
 
 
q
 
 
 
}
 
 
 
*
 
 
 
 
{
 
 
 
b
 
 
 
t
 
 
 
d
 
 
 
-
 
 
:
 
 
 
Misc.:
T
 
 
 
 
G
 
 
 
 
X
 
 
 
 
K
 
 
 
k
 
 
 
U
 
 
 


  • Boxes can contain arbitrary wiki markup. The contents of boxes are specified using additional named parameters appended to the template call. Each box is three tiles wide and normally has a 2 pixels wide black border. Boxes can have any name that is a valid template parameter name, although single character names should be avoided to prevent conflicts with tile symbols.

Style attributes

The appearance of the boxes may be controlled by the optional template parameters border and boxstyle. The former sets the width of the box border in pixels, while the latter can be used to append arbitrary CSS declarations directly to the box style attributes. For example, the following code:

{{familytree/start |summary=Box 1 married to Box 2, with children Box 3 and Box 4}}
{{familytree|border=0|boxstyle=background:#dfd;| | FOO |y| BAR | |FOO=Box 1|BAR=Box 2}}
{{familytree|border=0|boxstyle=background:#dfd;| | |,|-|^|-|.| | }}
{{familytree|border=0|boxstyle=background:#dfd;| | FOO | | BAR | |FOO=Box 3|BAR=Box 4}}
{{familytree/end}}

produces a result like this:


 
Box 1
 
Box 2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Box 3
 
Box 4
 

Style attributes can even be set for individual boxes, as in the example below:

{{familytree/start |White box with three children Red box, Green box, Blue box, all married to each other}}
{{familytree| | | | |WHITE| | | | |WHITE=White box
|boxstyle_WHITE = background-color: #fff;
}}
{{familytree| |,|-|-|'|!|`|-|-|.| }}
{{familytree|RED  |~|GREEN|~|BLUE |RED=Red box|GREEN=Green box|BLUE=Blue box
|boxstyle_RED   = background-color: #faa;
|boxstyle_GREEN = background-color: #afa;
|boxstyle_BLUE  = background-color: #aaf;
}}
{{familytree/end}}

which produces the output:


 
 
 
 
White box
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Red box
 
Green box
 
Blue box
 
 

NOTE: When specifying style attributes for individual named boxes, make sure the box names are aligned to the left side of area reserved for them in the template call (as in "|RED  |" instead of "| RED |" in the example above). Otherwise the template will end up looking for a style parameter with spaces in its name.

The {{familytree/start}} template also accepts an optional style parameter that can be used to set CSS styles for the entire table.

See also

I am A comedian Funny moments ...

Template parameters
Parameter Description Type Default Status
2 2 no description unknown empty optional
3 3 no description unknown empty optional
4 4 no description unknown empty optional
5 5 no description unknown empty optional
6 6 no description unknown empty optional
7 7 no description unknown empty optional
8 8 no description unknown empty optional
9 9 no description unknown empty optional
13 13 no description unknown empty optional
14 14 no description unknown empty optional
15 15 no description unknown empty optional
16 16 no description unknown empty optional
17 17 no description unknown empty optional
18 18 no description unknown empty optional
19 19 no description unknown empty optional
20 20 no description unknown empty optional
21 21 no description unknown empty optional
22 22 no description unknown empty optional
23 23 no description unknown empty optional
24 24 no description unknown empty optional
25 25 no description unknown empty optional
26 26 no description unknown empty optional
27 27 no description unknown empty optional
28 28 no description unknown empty optional
29 29 no description unknown empty optional
30 30 no description unknown empty optional
31 31 no description unknown empty optional
32 32 no description unknown empty optional
33 33 no description unknown empty optional
34 34 no description unknown empty optional
35 35 no description unknown empty optional
36 36 no description unknown empty optional
37 37 no description unknown empty optional
38 38 no description unknown empty optional
39 39 no description unknown empty optional
40 40 no description unknown empty optional
41 41 no description unknown empty optional
42 42 no description unknown empty optional
43 43 no description unknown empty optional
44 44 no description unknown empty optional
45 45 no description unknown empty optional
46 46 no description unknown empty optional
47 47 no description unknown empty optional
48 48 no description unknown empty optional
49 49 no description unknown empty optional
50 50 no description unknown empty optional
51 51 no description unknown empty optional
52 52 no description unknown empty optional
53 53 no description unknown empty optional
54 54 no description unknown empty optional
55 55 no description unknown empty optional
56 56 no description unknown empty optional
57 57 no description unknown empty optional
58 58 no description unknown empty optional
59 59 no description unknown empty optional
60 60 no description unknown empty optional
61 61 no description unknown empty optional
62 62 no description unknown empty optional
63 63 no description unknown empty optional
64 64 no description unknown empty optional
65 65 no description unknown empty optional
66 66 no description unknown empty optional
67 67 no description unknown empty optional
68 68 no description unknown empty optional
69 69 no description unknown empty optional
70 70 no description unknown empty optional
71 71 no description unknown empty optional
72 72 no description unknown empty optional
73 73 no description unknown empty optional
74 74 no description unknown empty optional
75 75 no description unknown empty optional
76 76 no description unknown empty optional
77 77 no description unknown empty optional
78 78 no description unknown empty optional
79 79 no description unknown empty optional
80 80 no description unknown empty optional
Boxstyle boxstyle no description unknown empty optional
Border border no description unknown empty optional
Boxstyle_{{{1 boxstyle_{{{1 no description unknown empty optional
Boxstyle_{{{2 boxstyle_{{{2 no description unknown empty optional
Boxstyle_{{{3 boxstyle_{{{3 no description unknown empty optional
Boxstyle_{{{4 boxstyle_{{{4 no description unknown empty optional
Boxstyle_{{{5 boxstyle_{{{5 no description unknown empty optional
Boxstyle_{{{6 boxstyle_{{{6 no description unknown empty optional
Boxstyle_{{{7 boxstyle_{{{7 no description unknown empty optional
Boxstyle_{{{8 boxstyle_{{{8 no description unknown empty optional
Boxstyle_{{{9 boxstyle_{{{9 no description unknown empty optional
Boxstyle_{{{10 boxstyle_{{{10 no description unknown empty optional
Boxstyle_{{{11 boxstyle_{{{11 no description unknown empty optional
Boxstyle_{{{12 boxstyle_{{{12 no description unknown empty optional
Boxstyle_{{{13 boxstyle_{{{13 no description unknown empty optional
Boxstyle_{{{14 boxstyle_{{{14 no description unknown empty optional
Boxstyle_{{{15 boxstyle_{{{15 no description unknown empty optional
Boxstyle_{{{16 boxstyle_{{{16 no description unknown empty optional
Boxstyle_{{{17 boxstyle_{{{17 no description unknown empty optional
Boxstyle_{{{18 boxstyle_{{{18 no description unknown empty optional
Boxstyle_{{{19 boxstyle_{{{19 no description unknown empty optional
Boxstyle_{{{20 boxstyle_{{{20 no description unknown empty optional
Boxstyle_{{{21 boxstyle_{{{21 no description unknown empty optional
Boxstyle_{{{22 boxstyle_{{{22 no description unknown empty optional
Boxstyle_{{{23 boxstyle_{{{23 no description unknown empty optional
Boxstyle_{{{24 boxstyle_{{{24 no description unknown empty optional
Boxstyle_{{{25 boxstyle_{{{25 no description unknown empty optional
Boxstyle_{{{26 boxstyle_{{{26 no description unknown empty optional
Boxstyle_{{{27 boxstyle_{{{27 no description unknown empty optional
Boxstyle_{{{28 boxstyle_{{{28 no description unknown empty optional
Boxstyle_{{{29 boxstyle_{{{29 no description unknown empty optional
Boxstyle_{{{30 boxstyle_{{{30 no description unknown empty optional
Boxstyle_{{{31 boxstyle_{{{31 no description unknown empty optional
Boxstyle_{{{32 boxstyle_{{{32 no description unknown empty optional
Boxstyle_{{{33 boxstyle_{{{33 no description unknown empty optional
Boxstyle_{{{34 boxstyle_{{{34 no description unknown empty optional
Boxstyle_{{{35 boxstyle_{{{35 no description unknown empty optional
Boxstyle_{{{36 boxstyle_{{{36 no description unknown empty optional
Boxstyle_{{{37 boxstyle_{{{37 no description unknown empty optional
Boxstyle_{{{38 boxstyle_{{{38 no description unknown empty optional
Boxstyle_{{{39 boxstyle_{{{39 no description unknown empty optional
Boxstyle_{{{40 boxstyle_{{{40 no description unknown empty optional
Boxstyle_{{{41 boxstyle_{{{41 no description unknown empty optional
Boxstyle_{{{42 boxstyle_{{{42 no description unknown empty optional
Boxstyle_{{{43 boxstyle_{{{43 no description unknown empty optional
Boxstyle_{{{44 boxstyle_{{{44 no description unknown empty optional
Boxstyle_{{{45 boxstyle_{{{45 no description unknown empty optional
Boxstyle_{{{46 boxstyle_{{{46 no description unknown empty optional
Boxstyle_{{{47 boxstyle_{{{47 no description unknown empty optional
Boxstyle_{{{48 boxstyle_{{{48 no description unknown empty optional
Boxstyle_{{{49 boxstyle_{{{49 no description unknown empty optional
Boxstyle_{{{50 boxstyle_{{{50 no description unknown empty optional
Boxstyle_{{{51 boxstyle_{{{51 no description unknown empty optional
Boxstyle_{{{52 boxstyle_{{{52 no description unknown empty optional
Boxstyle_{{{53 boxstyle_{{{53 no description unknown empty optional
Boxstyle_{{{54 boxstyle_{{{54 no description unknown empty optional
Boxstyle_{{{55 boxstyle_{{{55 no description unknown empty optional
Boxstyle_{{{56 boxstyle_{{{56 no description unknown empty optional
Boxstyle_{{{57 boxstyle_{{{57 no description unknown empty optional
Boxstyle_{{{58 boxstyle_{{{58 no description unknown empty optional
Boxstyle_{{{59 boxstyle_{{{59 no description unknown empty optional
Boxstyle_{{{60 boxstyle_{{{60 no description unknown empty optional
Boxstyle_{{{61 boxstyle_{{{61 no description unknown empty optional
Boxstyle_{{{62 boxstyle_{{{62 no description unknown empty optional
Boxstyle_{{{63 boxstyle_{{{63 no description unknown empty optional
Boxstyle_{{{64 boxstyle_{{{64 no description unknown empty optional
Boxstyle_{{{65 boxstyle_{{{65 no description unknown empty optional
Boxstyle_{{{66 boxstyle_{{{66 no description unknown empty optional
Boxstyle_{{{67 boxstyle_{{{67 no description unknown empty optional
Boxstyle_{{{68 boxstyle_{{{68 no description unknown empty optional
Boxstyle_{{{69 boxstyle_{{{69 no description unknown empty optional
Boxstyle_{{{70 boxstyle_{{{70 no description unknown empty optional
Boxstyle_{{{71 boxstyle_{{{71 no description unknown empty optional
Boxstyle_{{{72 boxstyle_{{{72 no description unknown empty optional
Boxstyle_{{{73 boxstyle_{{{73 no description unknown empty optional
Boxstyle_{{{74 boxstyle_{{{74 no description unknown empty optional
Boxstyle_{{{75 boxstyle_{{{75 no description unknown empty optional
Boxstyle_{{{76 boxstyle_{{{76 no description unknown empty optional
Boxstyle_{{{77 boxstyle_{{{77 no description unknown empty optional
Boxstyle_{{{78 boxstyle_{{{78 no description unknown empty optional
Boxstyle_{{{79 boxstyle_{{{79 no description unknown empty optional
Boxstyle_{{{80 boxstyle_{{{80 no description unknown empty optional
Arley Swaby Arley Swaby no description date empty suggested
Denia Swaby Ortiz Denia Swaby Ortiz no description unknown empty optional
Derlis Swaby R. Derlis Swaby R. no description unknown empty optional
Ashley Swaby Ashley Swaby no description unknown empty optional