Module:ILLArchiveList

--Outputs a list of ILL request archive pages, for use in Template:PILL header/archives --Lua by Bryght --DPL by Sophie with help from SuperDragon local p = {}

function p.main(frame) local numberOfRows = 2 local dpl = mw.getCurrentFrame:preprocess([=[]=]) local pages = mw.text.split(mw.text.trim(dpl), '\n') local total = #pages local itemsPerRow = math.ceil(total / numberOfRows) local t = {} for i = 1, total, itemsPerRow do       t[#t+1] = table.concat(pages, ', ', i, i - 1 + itemsPerRow) end return table.concat(t, ', ') end

return p