Module:Sandbox/BigGreenCahuna: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
 
(54 intermediate revisions by the same user not shown)
Line 2:
function p.hello( frame )
local args=frame.args
output = "Bob "
local testcheck = 0 local testcheck2 = 0 local testcheck3 = 0 local testcheck4 = 0
-- check 1
local done = 0
if args[1] == "1" then
Message = "Test1 " local testchecki = 1
elsewhile done == 0 do
Message =if args[1i] == nil then
output = output..args[2]" End."
done = 1
else
output = output.."Test2 " testcheck2 = 1..args[i]
i=i+1
end
end
 
--output=output..frame:preprocess(" <ref>Ref 1</ref><P>==Notes==<BR>{{Reflist|group=N}}")
-- check 2
local parent = frame:getParent(frame)
if args[2] == "5" then
--local grandparent = frame:getGrandparent(frame)
output = output.."Test2 " testcheck2 = 1
local grandparent = mw.title.getCurrentTitle().text
else
output=output.."<BR>Frame: "..frame:getTitle().."<BR>Parent: "..parent:getTitle().."<BR>GrandParent: "..grandparent --:getTitle()
output = output..args[2]
end
return output
end
 
function p.GetP( frame )
local parent = frame:getParent(frame)
return parent:getTitle()
end
 
function p.TestParent( frame )
local args=frame.args
output = "Calling template: "..args[1]
return output
end
 
return p