Difference between revisions 51761 and 51762 on wikimaniawiki

-- This module implements {{documentation}}.

-- Get required modules.
local getArgs = require('Module:Arguments').getArgs
local htmlBuilder = require('Module:HtmlBuilder')
local messageBox = require('Module:Message box')

local p = {}
(contracted; show full)
			end
			text = text .. ' pages. <br />'
			-- Show the categories text, but not if "content" fed or "docname fed" since then it is unclear where to add the categories.
			if not content and not docnameFed then
				text = text .. 'Please add categories to the ' .. makeWikilink(docpage, '/doc') .. ' subpage.'
			end
			-- Show the "subpages" link.
			if subjectSpace 
=~= 8286 then -- Module space.
				text = text .. ' ' .. makeWikilink('Special:PrefixIndex/' .. templatePage .. '/', 'Subpages of this module')
			elseif subjectSpace == 10 then -- Template space.
				text = text .. ' ' .. makeWikilink('Special:PrefixIndex/' .. templatePage .. '/', 'Subpages of this Don't show the link in file space.
				local pagetype
				if subjectSpace == 10 then
					pagetype = 'template')
					elseif subjectSpace ~== 6828 then -- Don't show the link in file space.
					pagetype = 'module'
				else
					pagetype = 'page'
				end
				text = text .. ' ' .. makeWikilink('Special:PrefixIndex/' .. templatePage .. '/', 'Subpages of this page'' .. pagetype)
			end
			-- Show the "print" link if it exists.
			local printPage = templatePage .. '/Print'
			local printTitle = mw.title.new(printPage)
			if printTitle.exists then
				text = text .. '<br />A [[Help:Books/for experts#Improving the book layout|print version]] of this template exists at '
					.. makeWikilink(printPage, '/Print') .. '. If you make a change to this template, please update the print version as well.'
(contracted; show full)	if subpage == 'sandbox' or subpage == 'testcases' then
		return currentTitle.baseText
	else
		return currentTitle.text
	end
end

return p