Module:SkillNav: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 13: Line 13:
         end
         end
     end
     end
    local isForceNav = args.forcenav ~= nil;


     -- Prepare a table of skill types to display in the navigation.
     -- Prepare a table of skill types to display in the navigation.
     local skill_types;
     local skill_types;
     if (args.forcenav == nil) then
     if (not isForceNav) then
         skill_types = {
         skill_types = {
             [1] = {
             [1] = {
Line 88: Line 90:
         }
         }
     end
     end
   
    local isForceNav = args.forcenav ~= nil;


     -- For backward compatibility. Do not remove until all pages are changed.
     -- For backward compatibility. Do not remove until all pages are changed.
Line 133: Line 133:


     header:attr('style', 'background-color:' .. colors)
     header:attr('style', 'background-color:' .. colors)
     if (args.forcenav == nil) then
     if (not isForceNav) then
         header:wikitext(frame:expandTemplate{
         header:wikitext(frame:expandTemplate{
             title = 'Face',
             title = 'Face',
Line 148: Line 148:
         args.l_name = args.name;
         args.l_name = args.name;
     end
     end
     if (args.forcenav == nil) then
     if (not isForceNav) then
         header:tag('span'):wikitext('[[' .. args.name .. lang_suffix .. '|' .. args.l_name .. ']] - ' .. args.l_skills);
         header:tag('span'):wikitext('[[' .. args.name .. lang_suffix .. '|' .. args.l_name .. ']] - ' .. args.l_skills);
     else
     else