匿名
未登录
中文(中国大陆)
登录
「荏苒之境」
搜索
查看“︁模块:TemplateData”︁的源代码
来自「荏苒之境」
命名空间
模块
讨论
更多
更多
页面操作
阅读
查看源代码
历史
清除缓存
←
模块:TemplateData
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
local utils_str = require("Module:Utils/String") local template_data = {} local TD_CACHE = {} local function extract(title) local td = TD_CACHE[title] if td == nil then local content = mw.title.new(title).content if not content then error("模板页面不存在:"..title) end td = utils_str.match_xml_noattr(content, "templatedata") TD_CACHE[title] = td end return td end template_data.extract = extract template_data.parse = function(title) local raw = extract(title) if raw == nil then return nil end local succ, res = pcall(mw.text.jsonDecode, raw) return succ and res or nil end template_data.show = function(frame) local title = frame.args.title if title == '' or title == nil then error("未指定模板标题。") end local td = extract(title) return td and frame:extensionTag("templatedata", td) or "" end return template_data
该页面使用的模板:
模块:TemplateData/doc
(
查看源代码
)
返回
模块:TemplateData
。
导航
导航
首页
最近更改
随机页面
特殊页面
wiki工具
wiki工具
Cargo数据
页面工具
页面工具
用户页面工具
更多
链入页面
相关更改
页面信息
页面日志