Module:链入文件
跳转到导航
跳转到搜索
local module = {};
module.main = function(frame)
if frame.args[1] ~= nil and frame.args[1] ~= '' then
local title = mw.title.new('File:'..frame.args[1]);
if title.file['exists'] then
local linkToFileReturn = '', title.file;
return linkToFileReturn;
else
error('没有“File:' .. frame.args[1] .. '”这个文件,请检查文件名是否正确!');
end
else
error('文件名为空,请输入文件名!');
end
end
return module;