Line 53: |
Line 53: |
| end | | end |
| | | |
− | Utils.t = Utils.method( {args = {"Formatting", "tooltip", "text"}} ) | + | local getArgs = require("Module:GetArgs") |
| + | |
| + | function Utils.context(frame) |
| + | local parentFrame = frame:getParent() |
| + | local args = getArgs{frame = parentFrame} |
| + | args.pagename = parentFrame:getTitle() |
| + | return args |
| + | end |
| + | |
| + | function Utils.test_context(frame) |
| + | local context = Utils.context(frame) |
| + | return "arg = " + (context.arg or "?") + " @ " + (context.pagename or "?") |
| + | end |
| | | |
| return Utils | | return Utils |