Module:CRTModel: Difference between revisions
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) |
Change "Add accessory" button to link to Create_an_accessory with crt_models parameter (via update-page on MediaWiki MCP Server) |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 298: | Line 298: | ||
) | ) | ||
-- Type badge (breadcrumb) — | -- Type badge (breadcrumb) — plainlinks hides external icon, $wgNoFollowDomainExceptions handles nofollow | ||
local badgeWikitext = '[[CRT Search|CRT]]' | local badgeWikitext = '[[CRT Search|CRT]]' | ||
if crt_type then | if crt_type then | ||
local typeUrl = mw.title.new('CRT Search'):fullUrl({crt_type = 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') | ||
| Line 716: | Line 715: | ||
local addAccessoryUrl = mw.uri.fullUrl( | local addAccessoryUrl = mw.uri.fullUrl( | ||
" | "Create an accessory", | ||
{ | { | ||
crt_models = pageName | |||
} | } | ||
) | ) | ||
| Line 817: | Line 815: | ||
local addPartUrl = mw.uri.fullUrl( | local addPartUrl = mw.uri.fullUrl( | ||
" | "Create a part", | ||
{ | { | ||
crt_models = pageName | |||
} | } | ||
) | ) | ||