Module:User:Erutuon/template demo

From Wiktionary, the free dictionary
Jump to navigation Jump to search

This is a private module sandbox of Erutuon, for his own experimentation. Items in this module may be added and removed at Erutuon's discretion; do not rely on this module's stability.


local export = {}

function export.show(frame)
	local args = pairs(frame.args)() and frame.args or frame:getParent().args
	local args_copy = require("Module:table").shallowClone(args)
	local template_name = table.remove(args_copy, 1)
	return require("Module:template link").format_link(args) .. "<br>"
		.. frame:expandTemplate { title = template_name, args = args_copy }
end

return export