Module:Param Parse: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
No edit summary Tag: Manual revert |
Microbrews (talk | contribs) (going to merge episode + location pages bc there is no meaningful distinction) |
||
Line 137: | Line 137: | ||
return '[[File:Unknown episode icon.png|18px|link=]] None' |
return '[[File:Unknown episode icon.png|18px|link=]] None' |
||
else |
else |
||
return '[[File:'..valid_episode..' episode icon.png|18px|link='..valid_episode..']] [['..valid_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 |
end |
||
end |
end |