Module:EveryCRTLinks
Documentation for this module may be created at Module:EveryCRTLinks/doc
-- Module:EveryCRTLinks
local p = {}
function p.addDocumentLink(frame)
local crt = mw.title.getCurrentTitle().text
-- You can tweak this target naming scheme
local target = crt .. " - document"
local url = mw.uri.fullUrl(
"Special:FormEdit",
{
form = "Document",
target = target,
-- PageForms prefill syntax:
["Document[crt_model]"] = crt
}
)
return string.format("[%s %s]", tostring(url), "Add a document for this CRT")
end
return p