Module:Documentation: Difference between revisions
Jump to navigation
Jump to search
m>Mr. Stradivarius don't check that we are not in the file namespace before adding the subpage blurb, as we already know we're either in the user, template or module namespace |
m>Mr. Stradivarius tweak comments |
||
Line 662: | Line 662: | ||
local text = '' | local text = '' | ||
if linkBox then | if linkBox then | ||
text = text .. linkBox | text = text .. linkBox | ||
else | else | ||
text = text .. (p.makeDocPageBlurb(args, env) or '') | text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." | ||
if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then | |||
if subjectSpace == 2 or subjectSpace == | -- We are in the user, template or module namespaces. | ||
-- We are in the user, module | -- Add sandbox and testcases links. | ||
-- "Editors can experiment in this template's sandbox and testcases pages." | |||
text = text .. p.makeExperimentBlurb(args, env) | text = text .. p.makeExperimentBlurb(args, env) | ||
text = text .. '<br />' | text = text .. '<br />' | ||
if not args.content and not args[1] then | if not args.content and not args[1] then | ||
-- | -- "Please add categories to the /doc subpage." | ||
-- or | -- Don't show this message with inline docs or with an explicitly specified doc page, | ||
-- as then it is unclear where to add the categories. | |||
text = text .. (p.makeCategoriesBlurb(args, env) or '') | text = text .. (p.makeCategoriesBlurb(args, env) or '') | ||
end | end | ||
text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') | text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" | ||
local printBlurb = p.makePrintBlurb(args, env) | local printBlurb = p.makePrintBlurb(args, env) -- Two-line blurb about print versions of templates. | ||
if printBlurb then | if printBlurb then | ||
text = text .. '<br />' .. printBlurb | text = text .. '<br />' .. printBlurb |