Module:DisplayTemplate: Difference between revisions
Appearance
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..." |
mNo edit summary |
||
| Line 1: | Line 1: | ||
-- Uses Scribunto to invoke the content of a template to an article without calling its categories | |||
local p = {} | local p = {} | ||
Revision as of 12:46, 5 February 2025
Documentation for this module may be created at Module:DisplayTemplate/doc
-- Uses Scribunto to invoke the content of a template to an article without calling its categories
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