Module:If

local p = {} function p.main( frame ) local sText = frame.args[1] local sTrueAction = frame.args[2] or frame.args["true"] local sFalseAction = frame.args[3] or frame.args["false"] if sText == nil then sText = mw.getCurrentFrame.preprocess(sTrueAction) else sText = mw.getCurrentFrame.preprocess(sFalseAction) end return sText end return p