Home / Forums / DynamiX Support / Open in new window or pop-up

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts

  • Heinrich
    Participant

    Is it possible to have the link from a 3D Slider image open in a new window or pop up window?

    Andy
    Andy
    Keymaster

    Hi,

    You can if you modify the DynamiX/lib/inc/piecemaker-frame.php file and change the following line

    <Hyperlink URL="<?php if($DYN_galexturl) { echo $DYN_galexturl; } ?>" Target="_self" />

    This would affect all links though. 

    Hope that helps


    Heinrich
    Participant

    Thanks Andy! I only have this one link so it would work perfectly!


    willhearne
    Participant

    I would like to achieve the same thing with my portfolio images currently opening in the same window…..


    Anonymous

    Hi,

    What version of DynamiX are you using? If you're using 2.8.3+ you can add a CSS Class within the post or gallery slide set. The class to add is target_blank – this will open the link associated with that image into a new window


    willhearne
    Participant

    Awesome, thanks for that.


    Tyson
    Participant

    Adding the class (target_blank) to the gallery slide set image works just fine UNLESS you use gallery filtering, then you are back to square one. Do you have any suggestions to keep the “open in new window” ability when filtering?

    Dynamix 2.9. WP 3.3.1

     

    Thanks in advance !

    ~T

    Andy
    Andy
    Keymaster

    That’s interesting – I’ll have to manually add that code in after a filter function has been performed.

     

    Edit DynamiX/lib/inc/gallery-grid.php and DynamiX/lib/inc/shortcodes.php and both files search for

     

    enhancement: function() {

     

    below that line place the following jQuery

     

    $(‘.target_blank a’).each(function() {
    $(this).click(function(event) {
    event.preventDefault();
    event.stopPropagation();
    window.open(this.href, ‘_blank’);
    });
    });

     

    Please let me know if that works.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.