Module:If preview: Difference between revisions

parent.args for pmain, fix boolean function name
(replace is_set with code from Module:Citation/CS1/Utilities. Note previous edit was derived from Module:Citation/CS1/sandbox code.)
(parent.args for pmain, fix boolean function name)
Line 37:
Preview_mode = frame:preprocess('{{REVISIONID}}'); -- use magic word to get revision id
if not (Preview_mode == nil or Preview_mode == '') then -- if there is a value then this is not a preiview
result = frameparent.args[2]
else
result = frameparent.args[1]; -- no value (nil or empty string) so this is a preview
end
return result
Line 54:
]]
 
function p.mainboolean(frame)
local result = ''
Preview_mode = frame:preprocess('{{REVISIONID}}'); -- use magic word to get revision id
Anonymous user