Module:Documentation: Difference between revisions

add comments for the rest of the functions
(convert makeCategoriesBlurb comment)
(add comments for the rest of the functions)
Line 854:
 
function p.makeSubpagesBlurb(args, env)
--[[
-- Get the template title object
-- Generates the "Subpages of this template" link.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'template-pagetype' --> 'template'
-- 'module-pagetype' --> 'module'
-- 'default-pagetype' --> 'page'
-- 'subpages-link-display' --> 'Subpages of this $1'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
Line 860 ⟶ 870:
return nil
end
-- Make the subpages blurb.
local pagetype
if subjectSpace == 10 then
Line 876 ⟶ 885:
 
function p.makePrintBlurb(args, env)
--[=[
-- Get the /Print title object
-- Generates the blurb displayed when there is a print version of the template available.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'print-link-display' --> '/Print'
-- 'print-blurb' --> 'A [[Help:Books/for experts#Improving the book layout|print version]]'
-- .. ' of this template exists at $1.'
-- .. ' If you make a change to this template, please update the print version as well.'
-- 'display-print-category' --> true
-- 'print-category' --> 'Templates with print versions'
--]=]
local printTitle = env.printTitle
if not printTitle then
return nil
end
-- Make the print blurb.
local ret
if printTitle.exists then
Anonymous user