Module:Documentation: Difference between revisions

Fix a typo; Don't show "How to use documentation" on Template:Documentation
(Inspired by https://backrooms.fandom.com/zh/index.php?curid=23882)
 
(Fix a typo; Don't show "How to use documentation" on Template:Documentation)
Line 19: Line 19:
else args.type = "Page" end
else args.type = "Page" end
end
end
local header = "[[File:Template-info.svg|x24px]] <b>" .. args.type .. " Documentaion</b>"
local header = "[[File:Template-info.svg|x24px]] <b>" .. args.type .. " Documentation</b>"
if args.content == nil and docPage.exists then  
if args.content == nil and docPage.exists then  
header = header .. tostring(mw.html.create("span"):addClass("documentation-actions")
header = header .. tostring(mw.html.create("span"):addClass("documentation-actions")
Line 46: Line 46:
local footer = " ([[Template:Documentation|How to use documentation?]])"
local footer = " ([[Template:Documentation|How to use documentation?]])"
if currentPage.fullText == "Template:Documentation" then footer = "" end
if args.content then
if args.content then
footer = "This is an inline documentation." .. footer
footer = "This is an inline documentation." .. footer
420

edits