Module:EveryCRTLinks

Revision as of 21:23, 15 December 2025 by Arclight (talk | contribs) (Created page with "-- 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, crt = crt } ) return string.format("[%s %s]", tostring(url), "Add a document for this CRT") end return p")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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,
      crt = crt
    }
  )

  return string.format("[%s %s]", tostring(url), "Add a document for this CRT")
end

return p
MediaWiki Appliance - Powered by TurnKey Linux