Difference between revisions of "Module:Documentation"

Jump to navigation Jump to search
more efficient code for the subpages link
en>Mr. Stradivarius
(try and keep the line length down a bit)
en>Mr. Stradivarius
(more efficient code for the subpages link)
Line 326: Line 326:
end
end
-- Show the "subpages" link.
-- Show the "subpages" link.
if subjectSpace == 828 then -- Module space.
if subjectSpace ~= 6 then -- Don't show the link in file space.
text = text .. ' ' .. makeWikilink('Special:PrefixIndex/' .. templatePage .. '/', 'Subpages of this module')
local pagetype
elseif subjectSpace == 10 then -- Template space.
if subjectSpace == 10 then
text = text .. ' ' .. makeWikilink('Special:PrefixIndex/' .. templatePage .. '/', 'Subpages of this template')
pagetype = 'template'
elseif subjectSpace ~= 6 then -- Don't show the link in file space.
elseif subjectSpace == 828 then
text = text .. ' ' .. makeWikilink('Special:PrefixIndex/' .. templatePage .. '/', 'Subpages of this page')
pagetype = 'module'
else
pagetype = 'page'
end
text = text .. ' ' .. makeWikilink('Special:PrefixIndex/' .. templatePage .. '/', 'Subpages of this ' .. pagetype)
end
end
-- Show the "print" link if it exists.
-- Show the "print" link if it exists.
Anonymous user

Navigation menu