Jump to content

Module:DisplayTemplate

Revision as of 12:43, 5 July 2024 by MarkWD (talk | contribs) (Created page with "local p = {} function p.showTemplate(frame) local templateName = frame.args[1] if not templateName then return "Error: No template name provided." end...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:DisplayTemplate/doc

local p = {}

function p.showTemplate(frame)
    local templateName = frame.args[1]
    if not templateName then
        return "Error: No template name provided."
    end
    
    local templateContent = mw.getCurrentFrame():expandTemplate{title = templateName}
    return templateContent
end

return p