Jump to content

Module:Navbox: Difference between revisions

36 bytes added ,  11 years ago
edge cases
m>Dragons flight
(pull navbar completely inside Lua)
m>Dragons flight
(edge cases)
Line 85: Line 85:
     local class = 'noprint plainlinks hlist navbar';
     local class = 'noprint plainlinks hlist navbar';
     local title;
     local title;
    args[1] = trim( args[1] or '' );
   
     if args[1] == '' then
     if args[1] == '' then
         title = mw.title.new( '' );
         title = mw.title.new( '' );
     elseif args[1]:sub(1,1) == ':' then
     elseif args[1]:sub(1,1) == ':' then
         title = mw.title.new( args[1] );
         title = mw.title.new( args[1]:sub(2) );
     else
     else
         title = mw.title.new( 'Template:' .. args[1] );
         title = mw.title.new( 'Template:' .. args[1] );
     end                  
     end      
      
      
     local mainpage, talkpage, editurl;
     local mainpage, talkpage, editurl;
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.