I am trying to tie a 20000 page wiki with a separate file repository with 5000 directories. Its rather random whether a wiki page has a matching repository page. Ideally I want to present a wiki link only if the target page exists, so users don't click on the link and get a 404. I would hope to write a template
{{repo}}
and for the template to check the validity of the remote link, and either display "Files here" if they were available, or blank if not. I'd rather not go down the pywikibot route of modifying pages as the files site changes.
I like the iframe extension, and if I could wrap that in a check, I could display the files page inside the wiki page neatly.