Module:Demo

From Illerai

This is the current revision of this page, as edited by Mark (Sọ̀rọ̀ | contribs) at 22:27, 2 November 2024 (1 revision imported). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Module documentation
This documentation is transcluded from Module:Demo/doc. [edit] [history] [purge]
Module:Demo requires Module:T.

This template should be used when there is no documentation for a Module or Template.


--<nowiki>
local T = require("Module:T")._main

local p = {}

function p.f(frame)
	local args = frame:getParent().args
	local template = args[1]
	local _args = {}
	for k, v in pairs(args) do
		if type(k) == "number" then
			if k ~= 1 then
				_args[k - 1] = v
			end
		else
			_args[k] = v
		end
	end
	return '<span class="plainlinks">' .. T(args) .. " produces<br>" .. frame:expandTemplate({ title = template, args = _args }) .. '</span>'
end

return p
--</nowiki>