Module:AVDevice: Difference between revisions

Add market field display to AV device infobox (matching CRT model pattern) (via update-page on MediaWiki MCP Server)
Add oem_manufacturer parameter extraction and display row in infobox (after Brand, before Model) (via update-page on MediaWiki MCP Server)
Line 251: Line 251:
local brand = trim(args.brand)
local brand = trim(args.brand)
local model_code = trim(args.model_code)
local model_code = trim(args.model_code)
local oem_manufacturer = trim(args.oem_manufacturer)
local device_type = trim(args.device_type)
local device_type = trim(args.device_type)
local format_family = trim(args.format_family)
local format_family = trim(args.format_family)
Line 318: Line 319:
local brandHtml = frame:preprocess(brandWikitext)
local brandHtml = frame:preprocess(brandWikitext)
addRow(container, 'Brand', brandHtml, true)
addRow(container, 'Brand', brandHtml, true)
end
-- OEM Manufacturer row (shown only when different from brand)
if oem_manufacturer then
local oemWikitext = string.format(
'{{#formredlink: target=%s |form=Manufacturer |existing page link text=%s }}',
oem_manufacturer, oem_manufacturer
)
local oemHtml = frame:preprocess(oemWikitext)
addRow(container, 'OEM', oemHtml, true)
end
end


MediaWiki Appliance - Powered by TurnKey Linux