local p =
function p.State(frame) local pframe = frame:getParent local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself local args = pframe.args -- the arguments passed TO the template, in the wikitext that transcludes the template local statecheck = config[1] -- check if first or second state local state -- initialise variable if statecheck
"State1" then return links[state] or linkpass or nil -- if first state no need for dash elseif state