Deprecated: Use of Skin::footerLink was deprecated in MediaWiki 1.40. [Called from SkinNimbus::specialPagesLink in /home/klonfsmj/littletail.wiki/skins/Nimbus/includes/SkinNimbus.php at line 40] in /home/klonfsmj/littletail.wiki/includes/debug/MWDebug.php on line 379
Module:If - Little Tail Wiki

Module:If

From Little Tail Wiki

Documentation for this module may be created at Module:If/doc

local p = {}

function p.main( frame )
    local tArgs = frame:getParent()

    if not(tArgs.args[1]) then
        tArgs = frame
    end

    local sText = tArgs.args[1]
    local sTrueAction = tArgs.args[2] or tArgs.args["true"]
    local sFalseAction = tArgs.args[3] or tArgs.args["false"]

    if sText == "" then
        sText = mw.getCurrentFrame():preprocess(sFalseAction)
    else
        sText = mw.getCurrentFrame():preprocess(sTrueAction)
    end
    return sText
end
return p