Module:Documentation: Difference between revisions

don't use messages for args either - would be a pain for other modules that have to use this module
(don't use messages for fmbox parameter names)
(don't use messages for args either - would be a pain for other modules that have to use this module)
Line 188:
-- The title object for the current page, or a test page passed with args.page.
local title
local titleArg = args[message('titleArg', 'string')].page
if titleArg then
title = mw.title.new(titleArg)
Line 317:
.css('clear', 'both')
.done()
.wikitext(frame:expandTemplate{title = sandboxNoticeTemplate, args = {[message('sandboxNoticeLivepageParam')] = args[message('livepageArg', 'string')].livepage}})
return tostring(notice)
end
Line 355:
-- Generate [view][edit][history][purge] or [create] links.
local links
local content = args[message('contentArg', 'string')].content
if not content then
-- No need to include the links if the documentation is on the template page itself.
Line 395:
data.purgeLinkDisplay = message('purgeLinkDisplay', 'string')
-- Create link if /doc doesn't exist.
local preload = args[message('preloadArg', 'string')].preload
if not preload then
if env.subjectSpace == 6 then -- File namespace
Line 432:
-- Heading
local heading = args[message('headingArg', 'string')].heading -- Blank values are not removed.
if heading == '' then
-- Don't display the start box if the heading arg is defined but blank.
Line 450:
-- Heading CSS
local headingStyle = args[message('headingStyleArgheading-style', 'string')]
if headingStyle then
data.headingStyleText = headingStyle
Line 501:
 
function p._content(args, env)
local content = args[message('contentArg', 'string')].content
if not content then
local docpage = args[1]
Line 531:
 
-- Argument processing in {{documentation}}.
local content = args[message('contentArg', 'string')].content
local linkBox = args[message('linkBoxArg',link box'string')] -- So "link box=off" works.
local docspace = env.docspace
local docname = args[1] -- Other docname, if fed.