Does anyone know how to move the facets by metadata? Right now, the facets are above the Universal Viewer, which I re-positioned to the top of the page. I’d like to move them down below the viewer. Any suggestions on how to do that?
Might depend on how you moved the Universal Viewer, but this sounds like the general problem that the
public_items_show hook just rolls through all of the plugins, I think in the order that they were installed, to display the content they produce.
For more precise placement, you can edit the
items/show.php file to use the get_specific_plugin_hook_output instead. That’d require calling that for each plugin’s output, but that way you get more control over the placement.
Ok, I can try that. Can you tell me what exactly needs to be done in the code? I don’t know php, but I can usually follow explicit directions with some success.
FYI, I moved the Universal Viewer just above the Items Metadata in the show.php file:
<?php fire_plugin_hook('public_items_show', array('view' => $this, 'item' => $item)); ?>
Ah! Good, that’s how I suspected you moved it around.
You’ll want to replace that with
<?php echo get_specific_plugin_hook_output('UniversalViewer', 'public_items_show', array('view' => $this, 'item' => $item)); ?>
That makes it so at the top it doesn’t show all the plugins’ content, just what UniversalViewer gives.
Then, wherever you want the facets, do the same thing but with ‘FacetByMetadata’ instead of ‘UniversalViewer’.
The trick is that if you have other plugins that add content to the page, you’ll have to add similar code for each plugin. It’s a trade-off of having one line do everything, versus many lines so you can control the location of the output.
Thanks, Patrick, that was successful!