Module:Sandbox/Ahecht
Appearance
{{Module rating }}
Usage
[edit]{{#invoke:Sandbox/Ahecht|main}}
Output
[edit]frame: table
frame.args: table
frame:getParent().args table
mw.getCurrentFrame():getTitle(): Module:Sandbox/Ahecht
mw.getCurrentFrame():getParent():getTitle(): Module:Sandbox/Ahecht/doc
See also
[edit]- Sandbox/Ahecht
- Sandbox/Ahecht/Catalog lookup link
- Sandbox/Ahecht/Cite DNV
- Sandbox/Ahecht/Gridiron color
- Sandbox/Ahecht/benchmark
- Sandbox/Ahecht/doc
- Sandbox/Ahecht/flag
- Sandbox/Ahecht/flag/Australia
- Sandbox/Ahecht/flag/Australia/doc
- Sandbox/Ahecht/flag/Canada
- Sandbox/Ahecht/flag/Canada/doc
- Sandbox/Ahecht/flag/China
- Sandbox/Ahecht/flag/China/doc
- Sandbox/Ahecht/flag/France
- Sandbox/Ahecht/flag/France/doc
- Sandbox/Ahecht/flag/Germany
- Sandbox/Ahecht/flag/Germany/doc
- Sandbox/Ahecht/flag/Iran
- Sandbox/Ahecht/flag/Iran/doc
- Sandbox/Ahecht/flag/Italy
- Sandbox/Ahecht/flag/Italy/doc
- Sandbox/Ahecht/flag/Japan
- Sandbox/Ahecht/flag/Japan/doc
- Sandbox/Ahecht/flag/Poland
- Sandbox/Ahecht/flag/Poland/doc
- Sandbox/Ahecht/flag/Spain
- Sandbox/Ahecht/flag/Spain/doc
- Sandbox/Ahecht/flag/United Kingdom
- Sandbox/Ahecht/flag/United Kingdom/doc
- Sandbox/Ahecht/flag/United States
- Sandbox/Ahecht/flag/United States/doc
- Sandbox/Ahecht/flag/doc
- Sandbox/Ahecht/flag/redirects
- Sandbox/Ahecht/flag/redirects/doc
- Sandbox/Ahecht/interwiki
- Sandbox/Ahecht/interwiki/doc
- Sandbox/Ahecht/min
- Sandbox/Ahecht/modsandbox
- Sandbox/Ahecht/navboxtolua
- Sandbox/Ahecht/navboxtolua/doc
- Sandbox/Ahecht/sandbox
- Sandbox/Ahecht/sandbox2
- Sandbox/Ahecht/sandbox2/doc
- Sandbox/Ahecht/trim date
- Sandbox/Ahecht/url-access
local p = {}
function p.main(frame)
local output = {}
output[1] = 'frame: ' .. type(frame) .. ' '
if frame[1] then
output[2] = frame[1]
else
output[2] = ''
end
output[3] = '<br />frame.args: ' .. type(frame.args) .. ' '
if frame.args[1] then
output[4] = frame.args[1]
else
output[4] = ''
end
output[5] = '<br />frame:getParent().args ' .. type(frame:getParent().args) .. ' '
if frame:getParent().args[1] then
output[6] = frame:getParent().args[1]
else
output[6] = ''
end
if frame.args['test'] == 0 then
output[7] = '<br />0 the number'
elseif frame.args['test'] == '0' then
output[7] = '<br />0 the character'
else
output[7] = ''
end
local thisframe = mw.getCurrentFrame()
if thisframe then
output[8] = "<br />mw.getCurrentFrame():getTitle(): "
output[9] = thisframe:getTitle()
thisframe = thisframe:getParent()
if thisframe then
output[10] = "<br />mw.getCurrentFrame():getParent():getTitle(): "
output[11] = thisframe:getTitle()
thisframe = thisframe:getParent()
if thisframe then
output[12] = "<br />mw.getCurrentFrame():getParent():getParent():getTitle(): "
output[13] = thisframe:getTitle()
end
end
end
return table.concat(output)
end
function p.isnumeric(frame)
local s = frame.args[1] or frame:getParent().args[1]
local boolean = (frame.args.boolean or frame:getParent().args.boolean) == 'true'
if type(s) == 'string' and mw.getContentLanguage():parseFormattedNumber( s ) then
return boolean and 1 or s
end
return boolean and 0 or ''
end
return p