Module:Param Parse: Difference between revisions
Make the icon link to the episode instead of the image itself
m (hide` (episode)` on link) |
(Make the icon link to the episode instead of the image itself) |
||
Line 133:
if valid_episode then
local page_name = valid_episode .. ' (episode)'
-- Check if the page with '(episode)' exists
if mw.title.new(page_name).exists then
return '[[File:'..valid_episode..' episode icon.png|18px|link='..page_name..']] [['..page_name..'|'..valid_episode..']]'
else
-- Fallback to the original episode name
return '[[File:'..valid_episode..' episode icon.png|18px|link='..valid_episode..']] [['..valid_episode..']]'
end
end
return nil
end
|