Module:Navbar/sandbox: Difference between revisions

Content deleted Content added
Jackmcbarn (talk | contribs)
make args local
Jackmcbarn (talk | contribs)
if a page does {{#invoke:navbar|navbar}}, figure out the title automatically
Line 39:
 
local function _navbar( args )
if not args[1] then
return htmlError('No name provided')
end
local good, title, talk_title;
good, title, talk_title = pcall( getTitle, args[1] or (':' .. mw.getCurrentFrame():getParent():getTitle()));
if not good then
return htmlError(title);