查看“模块:SectionEmbed”的源代码
因为以下原因,您没有权限编辑本页:
您可以查看与复制此页面的源代码。
local module = {}
local getArgs = require('Module:Arguments').getArgs
function errorMsg(text)
error(text..'[[分类:含有错误嵌入片段的页面]]')
end
function module._main(args, frame)
local titleName = args['page'] or ''
if titleName == '' then errorMsg('请传入要载入内容所在的页面!') end
local section = args['id'] or ''
section = string.gsub(section, '([%%%(%)%.%+%-%*%?%[%]%^%$])', '%%%1')
local params = args
params['page'] = nil
params['id'] = nil
local title = mw.title.new(titleName)
local redirect = ''
local content = title:getContent()
if content == nil then errorMsg('页面名无效,请确认传入的页面名是否正确!') end
000
1:0
该页面使用的模板:
返回至模块:SectionEmbed。