Difference between revisions of "Module:Documentation"

Jump to navigation Jump to search
m
171 revisions imported
en>Tacsipacsi
(don’t show “The above documentation is transcluded from…” when it’s not transcluded, but rather explicitly specified in the {{{content}}} parameter)
m (171 revisions imported)
 
(6 intermediate revisions by 3 users not shown)
Line 118: Line 118:
local parent = frame.getParent(frame)
local parent = frame.getParent(frame)
local output = p._main(parent.args)
local output = p._main(parent.args)
return frame:extensionTag{ name='templatestyles', args = { src= message('templatestyles-scr') } } .. frame:preprocess(output)
return frame:extensionTag{ name='templatestyles', args = { src= message('templatestyles-scr') } } .. output
end
end


Line 637: Line 637:
local content = args.content
local content = args.content
if not content and docTitle and docTitle.exists then
if not content and docTitle and docTitle.exists then
content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText}
content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle}
end
end
-- The line breaks below are necessary so that "=== Headings ===" at the start and end
-- The line breaks below are necessary so that "=== Headings ===" at the start and end
Line 739: Line 739:
-- 'history-link-display' --> 'history'
-- 'history-link-display' --> 'history'
-- 'transcluded-from-blurb' -->  
-- 'transcluded-from-blurb' -->  
-- 'The above [[Wikipedia:Template documentation|documentation]]  
-- 'The above [[w:Wikipedia:Template documentation|documentation]]  
-- is [[Wikipedia:Transclusion|transcluded]] from $1.'
-- is [[w:Wikipedia:Transclusion|transcluded]] from $1.'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'create-link-display' --> 'create'
-- 'create-link-display' --> 'create'
-- 'create-module-doc-blurb' -->
-- 'create-module-doc-blurb' -->
-- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].'
-- 'You might want to $1 a documentation page for this [[w:Wikipedia:Lua|Scribunto module]].'
--]=]
--]=]
local docTitle = env.docTitle
local docTitle = env.docTitle

Navigation menu