Open main menu

Changes

Module:Navbar

46 bytes added, 03:39, 7 May 2014
Per edit request
local HtmlBuilder = require('Module:HtmlBuilder')
local function trim(s)
return mw.ustring.match( s, "^%s*(.-)%s*$" )
end
local function errorhtmlError(s)
local span = HtmlBuilder.create('span')
end
local function getTitle( pageName )
pageName = trim( pageName );
local page_title, talk_page_title;
end
local function _navbar( args )
if not args[1] then
return errorhtmlError('No name provided')
end
good, title, talk_title = pcall( getTitle, args[1] );
if not good then
return errorhtmlError(title);
end
if not title then
return errorhtmlError('Page does not exist')
end
-- behavior of {{navbar}}, change any empty arguments to nil, so Lua will consider
-- them false too.
local args = {}
for k, v in pairs(origArgs) do
if v ~= '' then
Anonymous user