Difference between revisions 51799 and 51800 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')

-- Get the config table.
(contracted; show full)	end
	fmargs.text = text

	-- Return the fmbox output.
	return messageBox.main('fmbox', fmargs)
end


function p.makeCategoriesBlurb(args, env)
	-- Get the title object.
	local success, docTitle = env:grab('docTitle')
	if not success then
		-- docTitle is the error message.
		return docTitle
	end
	-- Make the blurb.
	local docPathLink = makeWikilink(docTitle.prefixedText, message('docLinkDisplay', 'string'))
	return message('addCategoriesBlurb', 'string', {docPathLink})
end

function p.makeDocPageBlurb(args, env)
	-- Get the title object.
	local success, docTitle = env:grab('docTitle')
	if not success then
		-- docTitle is the error message.
		return docTitle
	end
	-- Make the blurb.
(contracted; show full)
		local sort = (title.namespace == 0 and message('strangeUsageCategoryMainspaceSort', 'string') or '') .. title.prefixedText -- Sort on namespace.
		ret = ret .. makeCategoryLink(message('strangeUsageCategory', 'string'), sort)
	end
	return ret
end

return p