FANDOM


--<nowiki>
--
-- lightweight substitute for wikipedias Template:PAGENAMEBASE
-- removes the disambiguation part from a title, if there is one. So both
-- {{#invoke:Pagenamebase|main|foo (bar)}}
-- and
-- {{#invoke:Pagenamebase|main|foo}}
-- will expand to the string "foo".
 
local pagenamebase = {}
 
function pagenamebase.main(frame)
    local title = frame.args[1]
    return (title:gsub("%s*%(.*", ""))
end
 
return pagenamebase
 
--</nowiki>
Community content is available under CC-BY-SA unless otherwise noted.