Module:SubpageTable
来自OTTOWiki
更多操作
local p = {}
function p.table(frame)
local currentTitle = mw.title.getCurrentTitle()
-- 获取子页面的另一种方法
local result = frame:preprocess('{{Special:PrefixIndex/' .. currentTitle.prefixedText .. '/|hideredirects=1|stripprefix=1|format=table}}')
-- 如果返回空,添加提示
if result == "" then
return "此页面没有子页面。"
end
return result
end
return p