Module:Sandbox/Lord Farin

local p = {}

local priv = {} --Private functions function priv.isNull( arg ) return ( arg == nil or arg == "" ) end

--Public functions function p.definitionCategory( frame ) local tpl_args = frame:getParent.args local mwTitle = mw.title.getCurrentTitle local category = mwTitle.subpageText local tcNamespace if (priv.isNull( tpl_args.namespace )) then tcNamespace = "Definition" else tcNamespace = args.namespace end local tcPage if (priv.isNull( tpl_args.def )) then tcPage = category else tcPage = tpl_args.def end local result = tcNamespace .. ":" .. tcPage return frame:getParent:preprocess( result ) end

return p