Module:Multi Infobox

From RuneRealm Wiki

This is the current revision of this page, as edited by Alex (talk | contribs) at 00:12, 17 October 2024 (Created page with "local p = {} function p.main(frame) local args = frame:getParent().args if not args['text1'] then return '' end local cur = args['text1']..'='..args['item1'] local i = 2 while args['text'..i] do cur = cur..'|-|'..args['text'..i]..'='..args['item'..i] i = i + 1 end local res = frame:callParserFunction{ name = '#tag', args = { 'Tabber', cur } } return '<div class="multi-infobox">'..res..'</div>' end r..."). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Module documentation
This documentation is transcluded from Template:No documentation/doc. [edit] [history] [purge]
This module does not have any documentation. Please consider adding documentation at Module:Multi Infobox/doc. [edit]
Module:Multi Infobox's function main is invoked by Template:Multi Infobox.

local p = {}

function p.main(frame)
    local args = frame:getParent().args
    if not args['text1'] then
    	return ''
    end
    
    local cur = args['text1']..'='..args['item1']
    
    local i = 2
    while args['text'..i] do
    	cur = cur..'|-|'..args['text'..i]..'='..args['item'..i]
    	i = i + 1
    end
    
    local res = frame:callParserFunction{ name = '#tag', args = { 'Tabber', cur } }
    
    return '<div class="multi-infobox">'..res..'</div>'
end

return p