FANDOM


--<pre> demo module
--Emulates #if parser function
local p = {}
 
function p.main( frame )
    local tArgs = require("Dev:Arguments").getArgs(frame)
 
    if (tArgs) then
        local sText 
        local sCondition = tArgs[1]
        local sTrueAction = tArgs[2] or tArgs["true"] 
        local sFalseAction = tArgs[3] or tArgs["false"]
 
        if sCondition == nil or sCondition == "" then
            sText = frame:preprocess(sFalseAction)
        else
            sText = frame:preprocess(sTrueAction)
        end
        return sText or ""
    end
end
 
return p
-- [[Category:Lua modules]]

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.