Module:If preview/sandbox: Difference between revisions

Content deleted Content added
make the warning more intelligent
add pmain back
Line 31:
return frame.args[2] or ''
end
end
 
--[[
pmain
 
This function returns the either the first argument or second argument passed to
this module's parent (i.e. template using this module), depending on whether it
is being previewed.
 
Usage:
{{#invoke:If preview|pmain}}
 
]]
function p.pmain(frame)
return p.main(frame:getParent())
end