Modul:Transclusion count: Unterschied zwischen den Versionen
Modul:Transclusion count (Quelltext anzeigen)
Version vom 11. November 2022, 08:41 Uhr
, vor 3 JahrenRemove any Template: namespace designation from the demo arg
(Test stripping /sandbox from the end like with /doc to avoid all sandbox pages reporting no count) |
(Remove any Template: namespace designation from the demo arg) |
||
| Zeile 8: | Zeile 8: | ||
local namespace = mw.title.getCurrentTitle().namespace | local namespace = mw.title.getCurrentTitle().namespace | ||
if frame.args["demo"] and frame.args["demo"] ~= "" then | if frame.args["demo"] and frame.args["demo"] ~= "" then | ||
template = frame.args["demo"] | template = mw.ustring.gsub(frame.args["demo"],"^[Tt]emplate:","") | ||
elseif namespace == 10 then -- Template namespace | elseif namespace == 10 then -- Template namespace | ||
template = mw.title.getCurrentTitle().text | template = mw.title.getCurrentTitle().text | ||