Jump to content

Module:Episode

From Semantic Stargate Wiki
Revision as of 16:10, 21 July 2025 by LIMAFOX76 (talk | contribs) (Created page with "local data = mw.loadData("Module:Episode/data") local p={} function p.getInfo(frame) local episode = frame.args[1] -- for ex. "chilren of the gods" local nmspace, episodelink, episodetitle = unpack(data[episode] or {}) if data[episode] == "" or nil then return string.format("%s", episodelink, episodetitle) else return string.format("%s", nmespace, episodelink, episodetitle) end end return p")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Documentation icon Module documentation[create]
local data = mw.loadData("Module:Episode/data")
local p={}

function p.getInfo(frame)
	local episode = frame.args[1] -- for ex. "chilren of the gods"
	local nmspace, episodelink, episodetitle = unpack(data[episode] or {})
	if data[episode] == "" or nil then
		return string.format("[[%s|%s]]", episodelink, episodetitle)
		else
			return string.format("[[%s:%s|%s]]", nmespace, episodelink, episodetitle)
	end
end

return p