Jump to content

Module:Create plant stub

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Jts1882 (talk | contribs) at 14:25, 31 January 2021 (create with basic outline). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
require('Module:No globals')
local p = {}
local pargs = {}

local function getArgs (frame, args)

	local parents = mw.getCurrentFrame():getParent()

	for k,v in pairs(parents.args) do
		--check content
		if v and v ~= "" then
			args[k]=v --parents.args[k]
		end
	end

	for k,v in pairs(frame.args) do
		--check content
		if v and v ~= "" then
			args[k]=v 
		end
	end
end


p.main = function (frame)

	getArgs(frame,pargs)
	
	return "Species called ''" .. pargs['genus'] .. " " .. pargs['species'] .. " (" .. pargs['common_name'] .. ")"
 	
end
return p