Tagged: Image Link
-
AuthorPosts
-
May 11, 2019 at 4:20 pm #1099586
I want to link an jpg-image inside a text block to the original file.
Goal is exactly to show the original file in a new tab.
The original file has large dimensions, which is very much intentional.
I did so because I want the original file to open when the image in the textblock is clicked on with the mouse.
Or, respectively, when tapped on a mobile device.
Therefore I added an “individual link” to the image in the textblock, linking to the original file in a new tab/window.
It failed when using a link to the original fileinside the uploaded media contents. It opens in a lightbox. Whatever.
So I put the file in another folder inside wp-content.
The unwanted behaviour is the same.I want that to work as expected and announced.
What would I have to do?May 13, 2019 at 4:59 am #1099883Hey eee_lala,
So you want the image to open in a lightbox but not to fit to the screen? You want the image to display its actual dimensions even though it’s larger that the screen viewing it?
Best regards,
RikardMay 13, 2019 at 11:13 am #1100009Hey Rikard.
I want the original file to be opened in a new tab just the way the browser handles that.
The purpose is to provide the most direct way to download this respective file unaltered by other technologies.May 13, 2019 at 8:20 pm #1100258Hi eee_lala ,
You can have lightbox disabled in the theme and you’ll get the desired behavior.
Could you please give us a link to your website, we need more context to be able to help you.
Best regards,
VictoriaMay 14, 2019 at 11:01 am #1100456Hey Victoria.
So if I got it right this happens primarily in the context of Enfold rather than the context of the site. I would like to avoid vandalizing the other jpg-/png-links of the web project just to have some unaltered links on one page. If somehow possible.
Do you have a suggestion for that?Best regards
ErikMay 15, 2019 at 9:53 am #1100935Hi Erik,
Well, the click on the links marked for lightbox are listened for by the Javascript and so the attribute added to open in the new tab has no effect. You could write Javascript to change that behavior just for this page.
Best regards,
VictoriaMay 15, 2019 at 2:49 pm #1101081Okay.
It was quite a pain to figure out how to do it, but I resolved it.
For all others with the same issue:Pass on the individual css-class “noLightbox” onto your elements or respective parent elements.
Then add a code block somewhere in your page:<script type="text/javascript"> jQuery(document).ready ( jQuery(function() { jQuery('.noLightbox > a').addClass('noLightbox no-lightbox').removeClass('lightbox-added'); })); </script>
LightBox functionality will be disabled for links (‘a’) inside (‘>’) these DOM elements (‘noLightbox’).
The links will be opened in the current browser tab instead, except you did set the target differently.May 16, 2019 at 7:17 am #1101275Hi Erik,
Great, I’m glad that you found a solution and thanks a lot for sharing. Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
RikardMay 16, 2019 at 11:49 am #1101394So let’s close it.
May 16, 2019 at 4:35 pm #1101494Hi eee_lala,
We’re glad to hear that :)
Thanks for using Enfold and have a great day!Best regards,
Nikko -
AuthorPosts
- The topic ‘individual link on image not working’ is closed to new replies.