We are actively looking for staff to help us build the wiki. If you are interested please join our Discord server and apply.
Module:InfoboxModuleTest
Documentation for this module may be created at Module:InfoboxModuleTest/doc
-- Module:InfoboxTestModule local p = {} function p.displayFoundIn(frame) local foundIn = frame.args[1] local items = mw.text.split(foundIn, ',') local result = "" -- if there are no items, add "Nothing" as a placeholder if #items == 0 then items = {"Nothing"} end for i, item in ipairs(items) do item = mw.text.trim(item) -- generate an image name from the item name by replacing spaces with underscores local imageName = string.gsub(item, " ", "_") if item == "Nothing" then imageName = "X" end result = result .. '[[File:' .. imageName .. '.png|24px|link=]] [[' .. item .. ']]' -- add a separator if not the last item if i < #items then result = result .. ' ' end end return result end return p