Jump to content

Module:Documentation and Module:Documentation/sandbox: Difference between pages

(Difference between pages)
Content deleted Content added
per edit request on talk page - make the doc environment behave correctly, giving the actual template name on the doc page rather than the name of the "doc" subpage
 
No edit summary
 
Line 5: Line 5:


-- Get the config table.
-- Get the config table.
local cfg = mw.loadData('Module:Documentation/config')
local cfg = mw.loadData('Module:Documentation/config')


local p = {}
local p = {}
Line 657: Line 657:
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.prefixedText}
elseif not content then
content = mw.getCurrentFrame():preprocess(cfg['no-documentation'])
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
-- of docs are interpreted correctly.
-- of docs are interpreted correctly.