FANDOM


Reference PopupsEdit

http://dev.wikia.com/wiki/ReferencePopups

Family TreeEdit

Set up the modulesEdit

  1. Go to Module:Arguments and copy this code in.
  2. Go to Module:Familytree and copy this code in:
local p = {}
 
local cells = mw.loadData('Module:Familytree/elements')
 
function p._main(cell_args)
	local ret = mw.html.create()
	local top = ret:tag('tr')
						:css{ height = '1px',
								['text-align'] = 'center' }
	local bottom = ret:tag('tr')
						:css{ height = '1px',
								['text-align'] = 'center' }
	for _, v in ipairs(cell_args) do
		if type(v) == 'string' then
			top:wikitext(cells[v].t)
			bottom:wikitext(cells[v].b)
		else
			top:tag('td')
				:attr{ colspan = v.colspan or cell_args.colspan or 6,
						rowspan = v.rowspan or cell_args.rowspan or 2 }
				:css{ padding = '0.2em',
						border = (v.border or cell_args.border or '2') .. 'px solid black' }
				:cssText(v.boxstyle or cell_args.boxstyle)
				:wikitext(v.text)
		end
	end
	return tostring(ret)
end
 
function p.main(frame)
	local args = require('Module:Arguments').getArgs(frame, {wrappers = 'Template:Familytree', trim = false, removeBlanks = false})
	local cell_args = {
		colspan = args.colspan,
		rowspan = args.rowspan,
		border = args.border,
		boxstyle = args.boxstyle or 'background:Green;'
	}
	for _, val in ipairs(args) do
		local trimmedVal = val:match('^%s*(.-)%s*$')
		if trimmedVal == '' then
			trimmedVal = '$'
		end
		if cells[trimmedVal] then
			table.insert(cell_args, trimmedVal)
		else
			-- Unnamed params behave weirdly
			-- white space at the front counts for param_{{{1}}}, but not whitespace at the end, so remove it
			local rightTrimmedVal = val:gsub('%s+$','')
			table.insert(cell_args, {
				text = args[trimmedVal] or ('{{{'..trimmedVal..'}}}'),
				colspan = args['colspan_'..rightTrimmedVal],
				rowspan = args['rowspan_'..rightTrimmedVal],
				border = args['border_'..rightTrimmedVal],
				boxstyle = args['boxstyle_'..rightTrimmedVal]
			})
		end
	end
 
	return p._main(cell_args)
end
 
return p
  1. Go to Module:Familytree/elements. Now you have two options:
    • If you want a simple set of tiles (just solid and dashed)

local SLD = '1px solid black'
local DSH = '1px dashed black'
 
local data = {
    ['$'] = {
		t = { { attr = { colspan = '2', rowspan = '2'}, style = { width = '2em', height = '2em' } } }
			},
	['-'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = SLD, width = '2em', height = '1em' } } }
			},
	['~'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DSH, width = '2em', height = '1em' } } }
			},
	['!'] = {
		t = { { attr = { rowspan = '2' }, style = { ['border-right'] = SLD, width = '1em', height = '2em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	[':'] = {
		t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DSH, width = '1em', height = '2em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	[','] = {
		b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { style = { width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } }
			},
	['.'] = {
		b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } },
		t = { { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['`'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } }
			},
	["'"] = {
		b = { { style = { width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, ['border-bottom'] = SLD, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['v'] = {
		b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = SLD, width = '2em', height = '1em' } } }
			},
	['^'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, ['border-bottom'] = SLD, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } }
			},
	[')'] = {
		b = { { style = { width = '1em', height = '1em' } } },
		t = { { attr = { rowspan = '2' }, style = { ['border-right'] = SLD, width = '1em', height = '2em' } },
			{ style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } }
			},
	['('] = {
		b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, ['border-bottom'] = SLD, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['+'] = {
		b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, ['border-bottom'] = SLD, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } }
			},
	['F'] = {
		b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { style = { width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } }
			},
	['7'] = {
		b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } },
		t = { { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['L'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } }
			},
	['J'] = {
		b = { { style = { width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['V'] = {
		b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DSH, width = '2em', height = '1em' } } }
			},
	['A'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } }
			},
	['D'] = {
		b = { { style = { width = '1em', height = '1em' } } },
		t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DSH, width = '1em', height = '2em' } },
			{ style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } }
			},
	['C'] = {
		b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['%'] = {
		b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } }
			},
	['r'] = {
		b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { style = { width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } }
			},
	['n'] = {
		b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } },
		t = { { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['c'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } }
			},
	['j'] = {
		b = { { style = { width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DSH, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['y'] = {
		b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DSH, width = '2em', height = '1em' } } }
			},
	['h'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DSH, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } }
			},
	[']'] = {
		b = { { style = { width = '1em', height = '1em' } } },
		t = { { attr = { rowspan = '2' }, style = { ['border-right'] = SLD, width = '1em', height = '2em' } },
			{ style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } }
			},
	['['] = {
		b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DSH, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['#'] = {
		b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DSH, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } }
			},
	['p'] = {
		b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { style = { width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } }
			},
	['q'] = {
		b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } },
		t = { { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['b'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } }
			},
	['d'] = {
		b = { { style = { width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = DSH, ['border-bottom'] = SLD, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['u'] = {
		b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = SLD, width = '2em', height = '1em' } } }
			},
	['t'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { style = { ['border-right'] = DSH, ['border-bottom'] = SLD, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } }
			},
	['E'] = {
		b = { { style = { width = '1em', height = '1em' } } },
		t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DSH, width = '1em', height = '2em' } },
			{ style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } }
			},
	['3'] = {
		b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = DSH, ['border-bottom'] = SLD, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['*'] = {
		b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = DSH, ['border-bottom'] = SLD, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } }
			},
}
 
local retval = {}
 
for k,v in pairs(data) do
	retval[k] = {}
	for k2,v2 in pairs(v) do
		local renderedCells = mw.html.create()
		for k3,v3 in ipairs(v2) do
			renderedCells:tag('td'):css(v3.style or {}):attr(v3.attr or {})
		end
		retval[k][k2] = tostring(renderedCells)
	end
end
 
return retval
    • If you want a more complex set of tiles (solid, dashed, and dotted)

local SLD = '1px solid black'
local DSH = '1px dashed black'
local DOT = '1px dotted black'
 
local data = {
	['!'] = {
		t = { { attr = { rowspan = '2' }, style = { ['border-right'] = SLD, width = '1em', height = '2em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['%'] = {
		b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } }
			},
	["'"] = {
		b = { { style = { width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, ['border-bottom'] = SLD, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['('] = {
		b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, ['border-bottom'] = SLD, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	[')'] = {
		b = { { style = { width = '1em', height = '1em' } } },
		t = { { attr = { rowspan = '2' }, style = { ['border-right'] = SLD, width = '1em', height = '2em' } },
			{ style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } }
			},
	['*'] = {
		b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = DSH, ['border-bottom'] = SLD, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } }
			},
	['+'] = {
		b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, ['border-bottom'] = SLD, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } }
			},
	[','] = {
		b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { style = { width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } }
			},
	['-'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = SLD, width = '2em', height = '1em' } } }
			},
	['.'] = {
		b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } },
		t = { { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['7'] = {
		b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } },
		t = { { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	[':'] = {
		t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DSH, width = '1em', height = '2em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['A'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } }
			},
	['C'] = {
		b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['D'] = {
		b = { { style = { width = '1em', height = '1em' } } },
		t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DSH, width = '1em', height = '2em' } },
			{ style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } }
			},
	['F'] = {
		b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { style = { width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } }
			},
	['G'] = {
		b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = DOT, ['border-bottom'] = DOT, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['H'] = {
		b = { { style = { width = '1em', height = '1em' } } },
		t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DOT, width = '1em', height = '2em' } },
			{ style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } }
			},
	['J'] = {
		b = { { style = { width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['L'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } }
			},
	['M'] = {
		b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DOT, width = '2em', height = '1em' } } }
			},
	['P'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DOT, width = '2em', height = '1em' } } }
			},
	['Q'] = {
		t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DOT, width = '1em', height = '2em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['R'] = {
		b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = DOT, ['border-bottom'] = DOT, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } }
			},
	['S'] = {
		b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { style = { width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } }
			},
	['T3'] = {
		b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } },
		t = { { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['T'] = {
		b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } } },
		t = { { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['V'] = {
		b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DSH, width = '2em', height = '1em' } } }
			},
	['W'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { style = { ['border-right'] = DOT, ['border-bottom'] = DOT, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } }
			},
	['Y'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } }
			},
	['Z'] = {
		b = { { style = { width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = DOT, ['border-bottom'] = DOT, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['^'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, ['border-bottom'] = SLD, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } }
			},
	['$'] = {
		t = { { attr = { colspan = '2', rowspan = '2'}, style = { width = '2em', height = '2em' } } }
			},
	['`'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } }
			},
	['a2'] = {
		b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = DOT, ['border-bottom'] = '1px dashed #000001', width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } }
			},
	['a'] = {
		b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = DOT, ['border-bottom'] = SLD, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } }
			},
	['b2'] = {
		b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = DSH, ['border-bottom'] = '1px dotted #000001', width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } }
			},
	['b3'] = {
		b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DSH, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } }
			},
	['b'] = {
		b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DOT, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } }
			},
	['c'] = {
		b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = DSH, ['border-bottom'] = SLD, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['d'] = {
		b = { { style = { width = '1em', height = '1em' } } },
		t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DSH, width = '1em', height = '2em' } },
			{ style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } }
			},
	['e'] = {
		b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DSH, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['f'] = {
		b = { { style = { width = '1em', height = '1em' } } },
		t = { { attr = { rowspan = '2' }, style = { ['border-right'] = SLD, width = '1em', height = '2em' } },
			{ style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } }
			},
	['h'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DSH, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } }
			},
	['i'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { style = { ['border-right'] = DSH, ['border-bottom'] = SLD, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } }
			},
	['j'] = {
		b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = SLD, width = '2em', height = '1em' } } }
			},
	['k2'] = {
		b = { { style = { width = '1em', height = '1em' } } },
		t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DOT, width = '1em', height = '2em' } },
			{ style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } }
			},
	['k3'] = {
		b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } }
			},
	['k'] = {
		b = { { style = { width = '1em', height = '1em' } } },
		t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DOT, width = '1em', height = '2em' } },
			{ style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } }
			},
	['l2'] = {
		b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = DOT, ['border-bottom'] = '1px dashed #000001', width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['l3'] = {
		b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, ['border-bottom'] = SLD, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['l'] = {
		b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = DOT, ['border-bottom'] = SLD, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['m2'] = {
		b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DOT, width = '2em', height = '1em' } } }
			},
	['m'] = {
		b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DOT, width = '2em', height = '1em' } } }
			},
	['n2'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { style = { ['border-right'] = DSH, ['border-bottom'] = '1px dotted #000001', width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } }
			},
	['n'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DOT, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } }
			},
	['o2'] = {
		b = { { style = { width = '1em', height = '1em' } } },
		t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DSH, width = '1em', height = '2em' } },
			{ style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } }
			},
	['o'] = {
		b = { { style = { width = '1em', height = '1em' } } },
		t = { { attr = { rowspan = '2' }, style = { ['border-right'] = SLD, width = '1em', height = '2em' } },
			{ style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } }
			},
	['p2'] = {
		b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = DSH, ['border-bottom'] = '1px dotted #000001', width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['p'] = {
		b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DOT, width = '1em', height = '1em' } },
			{ attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } }
			},
	['q2'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { style = { ['border-right'] = DOT, ['border-bottom'] = '1px dashed #000001', width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } }
			},
	['q'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { style = { ['border-right'] = DOT, ['border-bottom'] = SLD, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } }
			},
	['r2'] = {
		b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DSH, width = '2em', height = '1em' } } }
			},
	['r'] = {
		b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = SLD, width = '2em', height = '1em' } } }
			},
	['t'] = {
		b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DSH, width = '1em', height = '1em' } },
			{ style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } }
			},
	['v'] = {
		b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = SLD, width = '2em', height = '1em' } } }
			},
	['x'] = {},
	['y'] = {
		b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } },
			{ style = { width = '1em', height = '1em' } } },
		t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DSH, width = '2em', height = '1em' } } }
			},
	['~'] = {
		b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } },
		t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DSH, width = '2em', height = '1em' } } }
			}
}
 
local retval = {}
 
for k,v in pairs(data) do
	retval[k] = {}
	for k2,v2 in pairs(v) do
		local renderedCells = mw.html.create()
		for k3,v3 in ipairs(v2) do
			renderedCells:tag('td'):css(v3.style or {}):attr(v3.attr or {})
		end
		retval[k][k2] = tostring(renderedCells)
	end
end
 
return retval

Set up the templatesEdit

  1. Go to Template:Familytree and copy in:
<includeonly>{{#invoke:FamilyTree|main}}</includeonly>
<noinclude>{{documentation}}[[Category:Familytree]]</noinclude>
  1. Go to Template:Familytree/start and copy in:
<table style="border-spacing: 0px; {{#switch: {{{align|}}}
|left = float: left;
|right = float: right;
|center = margin: 0 auto;
|#default = 
}} {{{style|}}}">
<noinclude>[[Category:Familytree]]</noinclude>
  1. Go to Template:Familytree/end and copy in:
</table>
<noinclude>[[Category:Familytree]]</noinclude>

Set up documentationEdit

There's a lot, so you really do want a separate documentation page for this template. Go to Template:Familytree/doc


Solid lines:
,
Template:Familytree/start<tr align="center"><td>
 
</td><td style="border-bottom:1px solid black">
 
</td></tr><tr align="center"><td style="border-right:1px solid black">
 
</td><td>
 
</td></tr>Template:Familytree/end
 
v
Template:Familytree/start<tr align="center"><td colspan="2" style="border-bottom:1px solid black">
 
</td></tr><tr align="center"><td style="border-right:1px solid black">
 
</td><td>
 
</td></tr>Template:Familytree/end
 
.
Template:Familytree/start<tr align="center"><td style="border-bottom:1px solid black">
 
</td><td rowspan="2">
 
</td></tr><tr align="center"><td style="border-right:1px solid black">
 
</td></tr>Template:Familytree/end
 
)
Template:Familytree/start<tr align="center"><td rowspan="2" style="border-right:1px solid black">
 
</td><td style="border-bottom:1px solid black">
 
</td></tr><tr align="center"><td>
 
</td></tr>Template:Familytree/end
 
+
Template:Familytree/start<tr align="center"><td style="border-right:1px solid black;border-bottom:1px solid black">
 
</td><td style="border-bottom:1px solid black">
 
</td></tr><tr align="center"><td style="border-right:1px solid black">
 
</td><td>
 
</td></tr>Template:Familytree/end
 
(
Template:Familytree/start<tr align="center"><td style="border-right:1px solid black;border-bottom:1px solid black">
 
</td><td rowspan="2">
 
</td></tr><tr align="center"><td style="border-right:1px solid black">
 
</td></tr>Template:Familytree/end
 
`
Template:Familytree/start<tr align="center"><td style="border-right:1px solid black">
 
</td><td style="border-bottom:1px solid black">
 
</td></tr><tr align="center"><td colspan="2">
 
</td></tr>Template:Familytree/end
 
^
Template:Familytree/start<tr align="center"><td style="border-right:1px solid black;border-bottom:1px solid black">
 
</td><td style="border-bottom:1px solid black">
 
</td></tr><tr align="center"><td colspan="2">
 
</td></tr>Template:Familytree/end
 
'
Template:Familytree/start<tr align="center"><td style="border-right:1px solid black;border-bottom:1px solid black">
 
</td><td>
 
</td></tr><tr align="center"><td colspan="2">
 
</td></tr>Template:Familytree/end
 
-
Template:Familytree/start<tr align="center"><td colspan="2" style="border-bottom:1px solid black">
 
</td></tr><tr align="center"><td colspan="2">
 
</td></tr>Template:Familytree/end
 
!
Template:Familytree/start<tr align="center"><td rowspan="2" style="border-right:1px solid black">
 
</td><td rowspan="2">
 
</td></tr><tr align="center"></tr>Template:Familytree/end
 
 
Template:Familytree/start<tr align="center"><td rowspan="2" colspan="2">
 
</td></tr><tr align="center"></tr>Template:Familytree/end
 
Dashed lines:
F
Template:Familytree/start<tr align="center"><td>
 
</td><td style="border-bottom:1px dashed black">
 
</td></tr><tr align="center"><td style="border-right:1px dashed black">
 
</td><td>
 
</td></tr>Template:Familytree/end
 
V
Template:Familytree/start<tr align="center"><td colspan="2" style="border-bottom:1px dashed black">
 
</td></tr><tr align="center"><td style="border-right:1px dashed black">
 
</td><td>
 
</td></tr>Template:Familytree/end
 
7
Template:Familytree/start<tr align="center"><td style="border-bottom:1px dashed black">
 
</td><td rowspan="2">
 
</td></tr><tr align="center"><td style="border-right:1px dashed black">
 
</td></tr>Template:Familytree/end
 
D
Template:Familytree/start<tr align="center"><td rowspan="2" style="border-right:1px dashed black">
 
</td><td style="border-bottom:1px dashed black">
 
</td></tr><tr align="center"><td>
 
</td></tr>Template:Familytree/end
 
%
Template:Familytree/start<tr align="center"><td style="border-right:1px dashed black;border-bottom:1px dashed black">
 
</td><td style="border-bottom:1px dashed black">
 
</td></tr><tr align="center"><td style="border-right:1px dashed black">
 
</td><td>
 
</td></tr>Template:Familytree/end
 
C
Template:Familytree/start<tr align="center"><td style="border-right:1px dashed black;border-bottom:1px dashed black">
 
</td><td rowspan="2">
 
</td></tr><tr align="center"><td style="border-right:1px dashed black">
 
</td></tr>Template:Familytree/end
 
L
Template:Familytree/start<tr align="center"><td style="border-right:1px dashed black">
 
</td><td style="border-bottom:1px dashed black">
 
</td></tr><tr align="center"><td colspan="2">
 
</td></tr>Template:Familytree/end
 
A
Template:Familytree/start<tr align="center"><td style="border-right:1px dashed black;border-bottom:1px dashed black">
 
</td><td style="border-bottom:1px dashed black">
 
</td></tr><tr align="center"><td colspan="2">
 
</td></tr>Template:Familytree/end
 
J
Template:Familytree/start<tr align="center"><td style="border-right:1px dashed black;border-bottom:1px dashed black">
 
</td><td>
 
</td></tr><tr align="center"><td colspan="2">
 
</td></tr>Template:Familytree/end
 
~
Template:Familytree/start<tr align="center"><td colspan="2" style="border-bottom:1px dashed black">
 
</td></tr><tr align="center"><td colspan="2">
 
</td></tr>Template:Familytree/end
 
:
Template:Familytree/start<tr align="center"><td rowspan="2" style="border-right:1px dashed black">
 
</td><td rowspan="2">
 
</td></tr><tr align="center"></tr>Template:Familytree/end
 
 
Template:Familytree/start<tr align="center"><td rowspan="2" colspan="2">
 
</td></tr><tr align="center"></tr>Template:Familytree/end
 
Mixed (1):
r
Template:Familytree/start<tr align="center"><td>
 
</td><td style="border-bottom:1px dashed black">
 
</td></tr><tr align="center"><td style="border-right:1px solid black">
 
</td><td>
 
</td></tr>Template:Familytree/end
 
y
Template:Familytree/start<tr align="center"><td colspan="2" style="border-bottom:1px dashed black">
 
</td></tr><tr align="center"><td style="border-right:1px solid black">
 
</td><td>
 
</td></tr>Template:Familytree/end
 
n
Template:Familytree/start<tr align="center"><td style="border-bottom:1px dashed black">
 
</td><td rowspan="2">
 
</td></tr><tr align="center"><td style="border-right:1px solid black">
 
</td></tr>Template:Familytree/end
 
]
Template:Familytree/start<tr align="center"><td rowspan="2" style="border-right:1px solid black">
 
</td><td style="border-bottom:1px dashed black">
 
</td></tr><tr align="center"><td>
 
</td></tr>Template:Familytree/end
 
#
Template:Familytree/start<tr align="center"><td style="border-right:1px solid black;border-bottom:1px dashed black">
 
</td><td style="border-bottom:1px dashed black">
 
</td></tr><tr align="center"><td style="border-right:1px solid black">
 
</td><td>
 
</td></tr>Template:Familytree/end
 
[
Template:Familytree/start<tr align="center"><td style="border-right:1px solid black;border-bottom:1px dashed black">
 
</td><td rowspan="2">
 
</td></tr><tr align="center"><td style="border-right:1px solid black">
 
</td></tr>Template:Familytree/end
 
c
Template:Familytree/start<tr align="center"><td style="border-right:1px solid black">
 
</td><td style="border-bottom:1px dashed black">
 
</td></tr><tr align="center"><td colspan="2">
 
</td></tr>Template:Familytree/end
 
h
Template:Familytree/start<tr align="center"><td style="border-right:1px solid black">
 
</td><td>
 
</td></tr><tr align="center"><td colspan="2" style="border-top:1px dashed black">
 
</td></tr>Template:Familytree/end
 
j
Template:Familytree/start<tr align="center"><td style="border-right:1px solid black;border-bottom:1px dashed black">
 
</td><td>
 
</td></tr><tr align="center"><td colspan="2">
 
</td></tr>Template:Familytree/end
 
Mixed (2):
p
Template:Familytree/start<tr align="center"><td>
 
</td><td style="border-bottom:1px solid black">
 
</td></tr><tr align="center"><td style="border-right:1px dashed black">
 
</td><td>
 
</td></tr>Template:Familytree/end
 
u
Template:Familytree/start<tr align="center"><td colspan="2" style="border-bottom:1px solid black">
 
</td></tr><tr align="center"><td style="border-right:1px dashed black">
 
</td><td>
 
</td></tr>Template:Familytree/end
 
q
Template:Familytree/start<tr align="center"><td style="border-bottom:1px solid black">
 
</td><td rowspan="2">
 
</td></tr><tr align="center"><td style="border-right:1px dashed black">
 
</td></tr>Template:Familytree/end
 
E
Template:Familytree/start<tr align="center"><td colspan="6" rowspan="2" style="border: 2px solid black; padding: 0.2em; ; ">{{{E}}}</td></tr><tr align="center"></tr>Template:Familytree/end  
*
Template:Familytree/start<tr align="center"><td style="border-right:1px dashed black;border-bottom:1px solid black">
 
</td><td style="border-bottom:1px solid black">
 
</td></tr><tr align="center"><td style="border-right:1px dashed black">
 
</td><td>
 
</td></tr>Template:Familytree/end
 
3
Template:Familytree/start<tr align="center"><td colspan="6" rowspan="2" style="border: 2px solid black; padding: 0.2em; ; ">{{{3}}}</td></tr><tr align="center"></tr>Template:Familytree/end  
b
Template:Familytree/start<tr align="center"><td style="border-right:1px dashed black">
 
</td><td style="border-bottom:1px solid black">
 
</td></tr><tr align="center"><td colspan="2">
 
</td></tr>Template:Familytree/end
 
t
Template:Familytree/start<tr align="center"><td style="border-right:1px dashed black;border-bottom:1px solid black">
 
</td><td style="border-bottom:1px solid black">
 
</td></tr><tr align="center"><td colspan="2">
 
</td></tr>Template:Familytree/end
 
d
Template:Familytree/start<tr align="center"><td style="border-right:1px dashed black;border-bottom:1px solid black">
 
</td><td>
 
</td></tr><tr align="center"><td colspan="2">
 
</td></tr>Template:Familytree/end
 

</pre>

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.