More actions
Content deleted Content added
// via Wikitext Extension for VSCode |
// via Wikitext Extension for VSCode |
||
Line 19: | Line 19: | ||
local fullTitle = namespace == '' and title or (namespace .. ':' .. title) |
local fullTitle = namespace == '' and title or (namespace .. ':' .. title) |
||
local page = mw.title.new(fullTitle) |
local page = mw.title.new(fullTitle) |
||
-- return fullTitle |
|||
if page and page.exists then |
if page and page.exists then |
||
return fullTitle |
return fullTitle |
||
end |
end |
||
end |
end |
||
return |
return 'test' |
||
end |
end |
||
return p |
Revision as of 00:22, 14 January 2025
Documentation for this module may be created at Module:Link/doc
local p = {}
local namespaces = {
'',
'Core',
'Keyword',
'Category',
'Condition',
'Damage',
'Drain',
'Property',
'Ability',
}
function p.l ( frame )
local args = frame.args
local title = args[1]
for _, namespace in ipairs(namespaces) do
local fullTitle = namespace == '' and title or (namespace .. ':' .. title)
local page = mw.title.new(fullTitle)
-- return fullTitle
if page and page.exists then
return fullTitle
end
end
return 'test'
end
return p