模組:Look from
外观
local p={}
function p._main(args, frame)
local title = args['1'] or tostring(mw.title.getCurrentTitle())
local title_ns = args['ns'] or frame:callParserFunction{name = "NAMESPACE", args = title}
if (frame:callParserFunction{name = "ns", args = title_ns} == '0') then else
title_ns = title_ns .. ':'
end
title = title_ns .. frame:callParserFunction{name = "PAGENAME", args = title}
local text = args['2'] or '以「-{' ..title ..'}-」開頭的' .. frame:expandTemplate{title = "NS1", args = {["2"]=title_ns}}
return '<span class="selfreference">[[Special:PrefixIndex/' .. title .. '|' .. text .. ']]</span>' .. frame:callParserFunction{name = "ns", args = title_ns}
end
function p.main(frame)
local args = frame:getParent().args
return p._main(args, frame)
end
return p