Using Mirador and UV viewers on different sites in Omeka-S

I want to use UniversalViewer for our main site, and Mirador for a sub-site.

I have the sub-site running on a different theme so I have more control.

UniversalViewer is already installed, along with Blocks Disposition. When I install Mirador module, it gets activated across ALL sites immediately. And Blocks Disposition doesn’t seem to be able to “disable” a module from showing anymore…

In the Mirador repo README, it says " This can be disabled via the module Blocks Disposition for each site", and I remember from the past if you clicked a 2nd time, an “x” would appear. But that isn’t happening anymore.

I tried de-activating module and then embedding Mirador directly into the theme for the sub-site using:

// Display the viewer with the specified item and specified options.
// The options for Mirador are directly passed to the partial, so they are
// available in the theme and set for the viewer.
echo $this->mirador($item, $options);

But it doesn’t show up when the module is de-activated.

How can I control the display of which viewers are being used on which site? And also how can I set the module to not display automatically as part of view.show.before or view.show.after?

– Ben

1 Like

OK here’s my solution, although I really think core/UI management of “view.show.before” and “view.show.after” would be a big improvement. You should be able to order whatever blocks the plugins are outputting, and also turn them on/off per site.

The solution at present is to control everything in the THEME.

First, you’ll likely need to remove any code in the theme that is automatically displaying view.show.before and view.show.after.

Then, you’ll need to manually insert the views on a per plugin basis - if there is enough documentation for you to do so.

In the case of Mirador and UV, it’s fairly simple for the item/show.phtml page.

    // Display the viewer with the specified item and specified options.
    // The options for UV are directly passed to the partial, so they are
    // available in the theme and set for the viewer.
    echo $this->universalViewer($item, $options);
// Display the viewer with the specified item and specified options.
// The options for Mirador are directly passed to the partial, so they are
// available in the theme and set for the viewer.
echo $this->mirador($item, $options);

Just noting here that we’re working on a feature for a future version (probably Omeka S 4) that will let you just reorder and turn on/off all the various elements of the show pages. For modules that switch over to that new system, users will be able to configure where and whether they appear for each site.

I think Daniel-KM’s Blocks Disposition module is intended to do something similar for the existing hooks (but I see that you had some issues with using it in this case).

2 Likes