Module:CRTModel: Difference between revisions

No edit summary
No edit summary
Line 112: Line 112:
addRow(tbl, 'Brand', brandHtml, true)
addRow(tbl, 'Brand', brandHtml, true)
end
end
-- ECID row: build as a normal external link wikitext; preprocess not required, but fine.
local ecidWikitext = string.format('[{{fullurl:%s|curid=%d}} EC%d]', pageName, pageId, pageId)
addRow(tbl, 'ECID', frame:preprocess(ecidWikitext), true)


if model_code then
if model_code then
Line 141: Line 137:
addRow(tbl, 'Chassis', chassisHtml, true)
addRow(tbl, 'Chassis', chassisHtml, true)
end
end
-- ECID row: build as a normal external link wikitext; preprocess not required, but fine.
local ecidWikitext = string.format('[{{fullurl:%s|curid=%d}} EC%d]', pageName, pageId, pageId)
addRow(tbl, 'ECID', frame:preprocess(ecidWikitext), true)


if height or width or depth then
if height or width or depth then
Line 187: Line 187:
local links = {}
local links = {}
if crtdatabase then
if crtdatabase then
table.insert(links, '[' .. crtdatabase .. ' CRT Database]')
table.insert(links, '* [' .. crtdatabase .. ' CRT Database]')
end
end
if consolemods then
if consolemods then
table.insert(links, '[' .. consolemods .. ' Console Mods Wiki]')
table.insert(links, '* [' .. consolemods .. ' Console Mods Wiki]')
end
end
local linksWikitext = table.concat(links, '<br>')
local linksWikitext = table.concat(links, '\n')
addFullRow(tbl, linksWikitext, 'padding:0.2em 0.4em;', false)
addFullRow(tbl, linksWikitext, 'padding:0.2em 0.4em;', false)
end
end
MediaWiki Appliance - Powered by TurnKey Linux