Module:CRTModel: Difference between revisions

Revert to Rev 7377 + fix badge: use plain wikilinks instead of mw.html.create('a') which gets HTML-escaped. Fixes Lua error on all CRT pages. (via update-page on MediaWiki MCP Server)
Badge fix: use plainlinks + external link with query params for pre-filtered CRT type search. $wgNoFollowDomainExceptions handles nofollow, plainlinks hides external icon. (via update-page on MediaWiki MCP Server)
Line 298: Line 298:
)
)


-- Type badge (breadcrumb) — plain wikilinks avoid nofollow and external-link icon
-- Type badge (breadcrumb) — plainlinks hides external icon, $wgNoFollowDomainExceptions handles nofollow
-- To enable pre-filtered type links later, add wiki domain to $wgNoFollowDomainExceptions
local badgeWikitext = '[[CRT Search|CRT]]'
local badgeWikitext = '[[CRT Search|CRT]]'
if crt_type then
if crt_type then
badgeWikitext = badgeWikitext .. ' › [[CRT Search|' .. crt_type .. ']]'
local typeUrl = mw.title.new('CRT Search'):fullUrl({crt_type = crt_type})
badgeWikitext = badgeWikitext .. ' › <span class="plainlinks">[' .. typeUrl .. ' ' .. crt_type .. ']</span>'
end
end
addFullRow(container, badgeWikitext, '', false, 'infobox-type-badge')
addFullRow(container, badgeWikitext, '', false, 'infobox-type-badge')
MediaWiki Appliance - Powered by TurnKey Linux