I’d like to come more up-to-speed regarding UI or theme customization but for now I hope this will be a relatively straightforward question.
When using the IIIF Module than enables the Universal Viewer how do I change the default behavior so that an item page uses only the Universal Viewer and not both
the default Open Seadragon viewer at the top half of the item page and Universal Viewer in the bottom half of the page? Currently testing the Center Row theme and need only one viewer to be active.
I’m just curious as I haven’t seen a specific theme that does this: Are there any base themes out there that are geared towards displaying Universal Viewer by default?
No, the distributed modules all use OpenSeadragon as the default viewer. Universal Viewer is added as a module (https://github.com/Daniel-KM/Omeka-S-module-UniversalViewer). I believe UV was initially distributed as part of the IIIF Server module but then the two were separated.
FWIW, I’m still trying to get UV to work with an external IIIF image server but haven’t visited the latest docs.
I’m on OS X but running Omeka-S under Vagrant (emulating Ubuntu Linux). In planning to clone my Vagrant Omeka-S instance and doing a beta version 4 update then I’ll get right back to UV and IIIF server.
Upgraded to beta4. Tried to follow your instructions (and making progress) but still seeing both OpenSeadragon and UV. Sounds straightforward but I’m new to PHP. Could you post a working example of that section of the show.phtml file?
I’m really struggling with this - my line numbers don’t match those that Daniel_Km point to - so I’m not sure if the github has changed and thus the lines aren’t right…can anyone provide me with a sample show.phtml that works - also what has to be done in the config of the universal viewr module. Please and thank you!
Each theme is different and evolves, so you need to adapt yours. If you use center row and want to replace the default viewer, remove all the css and js in the header, then, because Universal Viewer displays all the files of an item, you just need to check if it can read all the medias, so it’s not recommended to mix media that uv can read and others.
So replace line https://github.com/omeka-s-themes/centerrow/blob/master/view/omeka/site/item/show.phtml#L13-L22 by :
another problem I’m having is the show.phtml in the centerrow theme isn’t what is being used (I can rename that and it has no affect on the rendering) instead the show.phtml that is being used is:
omeka-s\application\view\omeka\site\item
If the template file is not present in your theme directory, Omeka takes the default one inside application/view/. So if you want to customize it, just copy it in your theme at the good place, and modify it. This is the same for the views created by the modules.
so I solved this issue with one line of CSS - while the universal viewer is still below the info on the page - at least the other viewer doesn’t show- I plan to fiddle with the CSS some more - but this solution did what I needed it to do - just show one viewer.
I’m currently attempting to do the same thing. I had no problem removing the default viewer and adding the Universal Viewer through the PHP above, but am a little confused as to what config setting for the Universal Viewer needs to be changed to remove the appended version at the bottom of the item page.
I tried editing line 84 of module.config.php under site settings to read:
I was having the same problem and I finally figured it out. You need to go to the Settings page for you site and uncheck “Append automatically to item page” under the Unviersal Viewer section.
Daniel, thanks for the the code snippets which does work as advertised. I don’t know how theme specific this is but, thinking out loud, wondering if perhaps as a future enhancement there’s a way to make this a more easily accessible option, either in the documentation or perhaps through the UI?
Ideally, the Universal viewer (and the other viewers I just published : Mirador and Diva) should be used by default when it is an image or an iiif, like it is with the pdf viewer, or the OpenDocument viewer. But it has some impact on other parts of Omeka S, so currently, they are only a view helper that can be added by theme creators.