Module:Episode: Difference between revisions
Appearance
Content deleted Content added
No edit summary |
No edit summary |
||
| Line 6: | Line 6: | ||
local nmspace, episodelink, episodetitle = unpack(data[episode]) |
local nmspace, episodelink, episodetitle = unpack(data[episode]) |
||
if nmspace == "" or nil then |
if nmspace == "" or nil then |
||
return string.format(" |
return string.format("Episode link = %s, Episode title = %s", episodelink, episodetitle) |
||
else |
else |
||
return string.format("Namespace = %s, Episode link = %s, Episode title = %s", nmespace, episodelink, episodetitle) |
return string.format("Namespace = %s, Episode link = %s, Episode title = %s", nmespace, episodelink, episodetitle) |
||
Revision as of 16:38, 21 July 2025
| You might want to create a documentation page for this Scribunto module. Editors can experiment in this module's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this module. |
local data = mw.loadData("Module:Episode/data")
local p={}
function p.getInfo(frame)
local episode = frame.args[string.lower(1)] --for ex. "chilren of the gods"
local nmspace, episodelink, episodetitle = unpack(data[episode])
if nmspace == "" or nil then
return string.format("Episode link = %s, Episode title = %s", episodelink, episodetitle)
else
return string.format("Namespace = %s, Episode link = %s, Episode title = %s", nmespace, episodelink, episodetitle)
end
end
return p