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 | local badgeWikitext = '[[:Category:Parts|Part]]' | ||
local badgeDetail = part_type or '' | |||
if part_subtype then | if part_subtype then | ||
badgeDetail = part_subtype .. ' ' .. badgeDetail | |||
end | end | ||
addFullRow(container, | if badgeDetail ~= '' then | ||
badgeWikitext = badgeWikitext .. ' › ' .. badgeDetail | |||
end | |||
addFullRow(container, badgeWikitext, '', false, 'infobox-type-badge') | |||
if image_main then | if image_main then | ||