Tagged: 

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #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?

    #1099883

    Hey 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,
    Rikard

    #1100009

    Hey 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.

    #1100258

    Hi 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,
    Victoria

    #1100456

    Hey 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
    Erik

    #1100935

    Hi 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,
    Victoria

    #1101081

    Okay.
    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.

    #1101275

    Hi 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,
    Rikard

    #1101394

    So let’s close it.

    #1101494

    Hi eee_lala,

    We’re glad to hear that :)
    Thanks for using Enfold and have a great day!

    Best regards,
    Nikko

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘individual link on image not working’ is closed to new replies.