Module:Sandbox/Dat Hack3r: Difference between revisions
Appearance
Dat Hack3r (talk | contribs) m Apparently Lua doesn't support negative array indices. |
Dat Hack3r (talk | contribs) m Forgot to add the colon (":") after the namespace. |
||
(2 intermediate revisions by the same user not shown) | |||
Line 24: | Line 24: | ||
else | else | ||
if mw.title.new(string.format(title_format, i), title.namespace).exists then | if mw.title.new(string.format(title_format, i), title.namespace).exists then | ||
table.insert(navlist, '[['..title. | table.insert(navlist, '[['..title.nsText..':'..string.format(title_format, i)..'|'..string.format(text_format, i)..']]') | ||
else | else | ||
table.insert(navlist, '<span class="seriesNavigation-item-inactive">'..string.format(text_format, i)..'</span>') | table.insert(navlist, '<span class="seriesNavigation-item-inactive">'..string.format(text_format, i)..'</span>') | ||
Line 31: | Line 31: | ||
end | end | ||
navlist[1] = prepad..navlist[1] | navlist[1] = prepad..navlist[1] | ||
navlist[ | navlist[#navlist] = navlist[#navlist]..postpad | ||
local templatestyles = mw.getCurrentFrame():extensionTag{ | local templatestyles = mw.getCurrentFrame():extensionTag{ |