Templates Wiki
m (Test)
m (Plz work)
Line 2: Line 2:
   
 
function p.exists(frame)
 
function p.exists(frame)
local template, _ = frame.args[1]:gsub('/.*$', '')
+
local arg = frame.args[1]
  +
local template, _ = arg:gsub('/.*$', '')
return '* [[' .. frame.args[1] .. ']] - [[' .. template .. ']]\n'
+
return '* [[' .. arg .. ']] - [[' .. template .. ']]\n'
 
end
 
end
   

Revision as of 12:17, 1 January 2018

Documentation for this module may be created at Module:Orphan subpages/doc

local p = {}

function p.exists(frame)
    local arg = frame.args[1]
    local template, _ = arg:gsub('/.*$', '')
    return '* [[' .. arg .. ']] - [[' .. template .. ']]\n'
end

return p