Please join this new Discord server!

Merge notice

Module:TemplateT

From Etrian Odyssey Wiki
This documentation is transcluded from Module:TemplateT/doc. To edit this documentation, click here.

Builds the list of template parameters output by Template:T. This module allows for an indefinite number of parameters to be listed by the template.



local p = {}

function p.template_t(frame)
	-- Name input for convenience
	local in_args = frame:getParent().args

	-- Start with a link to the template page, and nowiki the {{ }}
	output_text = mw.text.nowiki("{{") .. "[[Template:" .. in_args[1] .. "|" .. in_args[1] .. "]]"
	-- Iterate over the parameters, skipping the first one
	for i, param in ipairs(in_args) do
		if i ~= 1 then
			output_text = output_text .. "|" .. param
		end
	end
	
	output_text = output_text .. mw.text.nowiki("}}")
	
	return output_text
end

return p