Apologies in an advance since this a question coming from someone with somewhat limited knowledge of PHP (me): for items with a JPEG file attached, I’m trying to figure out how to add a custom HTML attribute to the linked image. It’s an attribute so we can use Fancybox.js on the site—data-fancybox="gallery".
So instead of this…
<div class="media-render file">
<a href="image.jpg" ...>
<img ... />
</a>
</div>
…I’m hoping to have this code:
<div class="media-render file">
<a href="image.jpg" data-fancybox="gallery" ...>
<img ... />
</a>
</div>
Is there a way to do that through one of the /view/* PHTML templates? Or would I have to make changes to a different file, like a PHP helper?—and if the latter, is there a way to override the helper via the theme, or would we need to just edit the existing code for that Omeka installation?
For future projects we’ll likely use the native Omeka S lightbox block for our resource pages (thank you for making that an option!!) but we’re in a bind at the moment as we’re working to migrate an existing project into Omeka S with as few visual changes as possible.
(Edited to fix a typo and change the forum category)