Module:Part: Difference between revisions

Add type badge below infobox title showing part_type (and subtype if present) for visual differentiation (via update-page on MediaWiki MCP Server)
Change type badge to breadcrumb style: Part › [subtype] [type] (via update-page on MediaWiki MCP Server)
 
Line 112: Line 112:
)
)


-- Type badge
-- Type badge (breadcrumb)
local badgeText = part_type or 'Part'
local badgeWikitext = '[[:Category:Parts|Part]]'
local badgeDetail = part_type or ''
if part_subtype then
if part_subtype then
badgeText = part_subtype .. ' ' .. badgeText
badgeDetail = part_subtype .. ' ' .. badgeDetail
end
end
addFullRow(container, badgeText, '', false, 'infobox-type-badge')
if badgeDetail ~= '' then
badgeWikitext = badgeWikitext .. ' › ' .. badgeDetail
end
addFullRow(container, badgeWikitext, '', false, 'infobox-type-badge')


if image_main then
if image_main then
MediaWiki Appliance - Powered by TurnKey Linux