Module:ListAllData

--[[ Warning This template is locked and not editable by normal users. Reason: This is protected to prevent unwanted wiki page from malfunctioning. This template could be linked to some major pages which are important. This template is monitored by Random staff members If you strongly feel that there is a need to edit this page, tell us why in the Monbattle Wiki Administrator Message Wall. jianmingyong is the primary caretaker for these templates so contact him via Message Wall with any questions. Avoid spamming Message Wall to other staff member as they are not involved in the making of this template. Usage:

--]]

local p = {}

function p.main(frame) local Param1 = nil local Param2 = nil local Param3 = nil local Data = nil local SortedData = {} local ReturnText = nil if frame.args[1] ~= nil then Param1 = frame.args[1] Data = mw.loadData('Module:' .. Param1) for key in pairs(Data) do table.insert(SortedData,key) end table.sort(SortedData) if frame.args[2]~= nil then Param2 = frame.args[2] if frame.args[3]~= nil then Param3 = frame.args[3] for value,key in ipairs(SortedData) do                   if ReturnText == nil then if frame:preprocess("") ~= "Undefined" then ReturnText = "\n" end else if frame:preprocess("") ~= "Undefined" then ReturnText = ReturnText .. "\n" end end end else for value,key in ipairs(SortedData) do                   if ReturnText == nil then if frame:preprocess("") ~= "Undefined" then ReturnText = "\n" end else if frame:preprocess("") ~= "Undefinded" then ReturnText = ReturnText .. "\n" end end end end end end return frame:preprocess(ReturnText) end

return p