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|v|GF|GM=[[Grayson Gilbert]]|GF=[[Miranda Sommers-Gilbert|Miranda Gilbert]]
|boxstyle_GM=background-color: #D3EBFD;
|boxstyle_GF=background-color: #FFDAE0;}}
{{familytree| |,|-|^|-|.| |}}
{{familytree|M| |U|M=[[Elena Gilbert]]|U=[[Jeremy Gilbert]]
|boxstyle_M=background-color: #D3EBFD;
|boxstyle_U=background-color: #FFDAE0;}}
{{familytree/end}}

Gives:

Grayson Gilbert
 
Miranda Gilbert
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Elena Gilbert
 
Jeremy Gilbert

More Info

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

Treści społeczności są dostępne na podstawie licencji CC-BY-SA , o ile nie zaznaczono inaczej.