FANDOM


How to create a family tree with code.

The Basics

In the familytree sections, you put "boxes" separated with pipes, and they translate to symbols. The basics:

{{familytree/start|sample tree}}
{{familytree|GM|y|GF|}}
{{familytree| |,|-|^|-|.| |}}
{{familytree|M| |U|}}
{{familytree/end}}

Gives:

{{{GM}}}
 
{{{GF}}}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
{{{M}}}
 
{{{U}}}


Next, add names to the boxes like this:

{{familytree/start|sample tree}}
{{familytree|GM|y|GF|GM=Grandma|GF=Grandpa}}
{{familytree| |,|-|^|-|.| |}}
{{familytree|M| |U|M=Mother|U=Uncle}}
{{familytree/end}}

Gives:

Grandma
 
Grandpa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Mother
 
Uncle

To color the boxes:

{{familytree/start|sample tree}}
{{familytree|GM|y|GF|GM=[[Grandma]]|GF=[[Grandpa]]
|boxstyle_GM=background-color: #D3EBFD;
|boxstyle_GF=background-color: #FFDAE0;}}
{{familytree| |,|-|^|-|.| |}}
{{familytree|M| |U|M=Mother|U=Uncle
|boxstyle_M=background-color: #D3EBFD;
|boxstyle_U=background-color: #FFDAE0;}}
{{familytree/end}}

Gives:

Grandma
 
Grandpa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Mother
 
Uncle

More Info

Check this article on wikipedia for advanced usage and the explanation of all symbols.

Community content is available under CC-BY-SA unless otherwise noted.