Preview of items instead than going to the items page

Hello!

when i was tring to find a way to make that when you click on an item it shows a preview of said item instead of going to the item’s page i saw this incrediblly useful post Lightbox for Items show page for Omeka S and it happed to explain exaclty what i wanted, but when following the steps in the last one i tripped and can’t underestand the way to fixed this.

(I tried to post in the original post but it was closed)

Soo this is what i did:

Im using the theme Thanks Roy 1.0.1 as the base, also im in Omeka S 3.2.3, soo:
-First i istalled the files in the correct folder

-then i added the file paths to my layout.phtml

-Then i moved the jquery to the bottom of the Head Scripts so it won’t load before the magnific-popup.js (as seen in the image before)

-Finally i went to the file → view>omeka>site>item>show.phtml
And here i tried a bunch of diferent things:
image

image

I also tried doing this:
image

Or upright deleting the part where the item is shown

Also more tries:
image

image

I underestand how it works i’ve read the doumentation https://dimsemenov.com/plugins/magnific-popup/documentation.html:
image

But at this point I dont know what to do…

If anyone knows anything about this or magnific popup it would be much aprecieted, thanks to @ckarpinski for the original post,

and any help is welcomed! thanks

Hi,
It looks to me like you are putting the script that initiates magnific popup inside the php scripts that output it onto the page instead of in a regular script tag? I may be wrong but I have not seen it used that way before.

So in the show.phtml page first there is this

Then at the bottom there is the script to initiate it:

Try separating them and see if that solves it?

1 Like

Hi ! Thanks for the reply!

I was able to finally make it work better thanks to the tip, and if anyone in the furure is like me the thing was to move this:

To the bottom of the layout.phtml, just before the footer.

That being said, evethough it activates in the way i want, it cant load the image
image

the code is the same as before i just moved the activation

The reason i think this happens is that the article in the media-render that is printed in the main page makes an href to an item not an image:
image

I think this is the case because when you enter it, the magnific popup works perfectly:
image

I dont know if you have found yourself in this situation ckarpinski but it would help alot if you knew. Thank you again

And if someone else also has an idea on how to solve this any ideas are welcomed :hugs:

Hi, This is not what the code does for me, mine shows the full URL to the full size image file.

It seems to me this has something to do with Omeka S and not the magnific popup setup. Prior to setting up the popup I had it linking to the full size image not to a work page. The examples on the OmekaS demo work this way too so I am not sure what you may have different that is making it link to the page instead.

Hopefully someone who knows Omeka S better can help.

1 Like

nono after reviwing more carefully you are completly right i arrived to the a same concusion, the magnific pop-up works correktly it’s a problem on how Omeka puts together the items and the images,

how is your code? im almost sure that this is in the omeka/site/item/browse.phtml and i suspect that has to do with the url()

Thank you very much again!

This topic was automatically closed 360 days after the last reply. New replies are no longer allowed.