Chnage order of plugins on Item description page

Is there a simple way to change the order of the items in the item description page, specifically the image viewer plugin? I’d like to have that higher up so when visitors get to an item description they can see it without having to scroll, and before the images are shown just as thumbnails one after the other. I’m using the Berlin theme. Thanks!

That would call for a change to the items/show.php in your theme. You’d need to remove this line

 <?php fire_plugin_hook('public_items_show', array('view' => $this, 'item' => $item)); ?>

and instead use [get_specific_plugin_hook_output]( for each plugin’s data you want to show.

<?php echo get_specific_plugin_hook_output('UniversalViewer', 'public_items_show'); ?> 

1 Like

Hi @patrickmj when I tried use echo get_specific_plugin_hook_output for each specific plugin, this error is displayed:

<?php echo get_specific_plugin_hook_output('Stats', 'public_items_show'); ?>


Thanks for your help.

When you’re doing this kind of conversion, you should also bring along the extra arguments that are passed to the original fire_plugin_hook call when you’re adding get_specific_plugin_hook calls.

Here, the original is

<?php fire_plugin_hook('public_items_show', array('view' => $this, 'item' => $item)); ?>

so your “specific” call should be

<?php echo get_specific_plugin_hook_output('Stats', 'public_items_show', array('view' => $this, 'item' => $item)); ?>
1 Like

Hello jflatnes. Thanks. I understand it. I’ll try it.