Module:Documentation: Difference between revisions
more efficient code for the subpages link
m>Mr. Stradivarius (try and keep the line length down a bit) |
m>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 = | if subjectSpace ~= 6 then -- Don't show the link in file space. | ||
local pagetype | |||
if subjectSpace == 10 then | |||
pagetype = 'template' | |||
elseif subjectSpace == 828 then | |||
text = text .. ' ' .. makeWikilink('Special:PrefixIndex/' .. templatePage .. '/', 'Subpages of this | 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. |