Module:CRTModel: Difference between revisions
Fix external link icon on badge: wrap type link in plainlinks class (via update-page on MediaWiki MCP Server) |
Fix breadcrumb type link: use raw HTML <a> tag via mw.html.create() instead of wikitext external link — eliminates nofollow and external link icon (via update-page on MediaWiki MCP Server) |
||
| Line 298: | Line 298: | ||
) | ) | ||
-- Type badge (breadcrumb) | -- Type badge (breadcrumb) — raw <a> tag avoids nofollow/external decoration | ||
local badgeWikitext = '[[CRT Search|CRT]]' | local badgeWikitext = '[[CRT Search|CRT]]' | ||
if crt_type then | if crt_type then | ||
local typeUrl = | local typeUrl = mw.title.new('CRT Search'):fullUrl({crt_type = crt_type}) | ||
local typeLink = tostring(mw.html.create('a'):attr('href', typeUrl):wikitext(crt_type)) | |||
badgeWikitext = badgeWikitext .. ' › ' .. typeLink | |||
end | end | ||
addFullRow(container, badgeWikitext, '', false, 'infobox-type-badge') | addFullRow(container, badgeWikitext, '', false, 'infobox-type-badge') | ||