Module:Sandbox/BigGreenCahuna: Difference between revisions

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