Module:Template

From Wikibase Personal data
Revision as of 19:39, 23 October 2019 by Podehaye (talk | contribs) (Created page with "p = {} p.format_named_parameters = function(frame) local args = "" for key, arg in pairs(frame.args) do if type(key) ~= "number" then args = args .. "\|" .. tostring...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

p = {}
 
p.format_named_parameters = function(frame)
	local args = ""
	for key, arg in pairs(frame.args) do
		if type(key) ~= "number" then 
			args = args .. "\|" .. tostring(key) .. "=" .. tostring(arg)
		end
	end
	
	return args
end
 
p.format_pname_parameters = function(frame)
	return p.format_named_parameters ( frame:getParent())
end
 
return p