Home / Forums / DynamiX Support / Category Filtering and “Open in New Window”

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

  • Tyson
    Participant

    Hi Andy,

    I’m able to add the CSS class to slide set images ( target_blank ) so that my grid gallery thumb links will open in a new window.This is working great.

    However, when sorted/category filtered, the thumb links open in the same window. Can you please advise me on how to keep the ability to “open in new window” during category filtering of a grid gallery?

     

    I believe I have found the lines of code in the custom sorting plugin where the below parameters may be modified. I have a theory that I can add this inside the DIV tag to open links in new window while sorted/filtered:   class=”target_blank”

    However, I’m not exactly a guru like you are so I seek your advice to find where this java/jquery is generated from.

    Thanks for your help.

     

    		$('.grid-gallery #cwz-sortable-0 .galleryimg').append('<div style="height:inherit"></div>');
    $('.grid-gallery #cwz-sortable-0 .galleryvid').append('<div style="height:inherit"></div>');
    Andy
    Andy
    Keymaster

    Hi Tyson,

     

    You could try adding

     

    $('.grid-gallery #cwz-sortable-0').addClass('target_blank');

     

     


    Tyson
    Participant

    Oh Andy……
    WHERE do I put this code?

    Thanks in advance.
    Tyson

    Andy
    Andy
    Keymaster

    Do you want it on all grid galleries with filtering?


    Tyson
    Participant

    Yes please!

     

    Unless you want to give me instructions to apply only to specific galleries in addition to a global setting.

    Whichever is easier for you.

    Thanks mucho!


    Tyson
    Participant

    …and to clarify, the code that I quoted above is what I scraped from Internet Explorer (“view->source” feature). I’m asking where in the backend code (.php or whatever) should I insert the code snippet that you provided (or will provide in response to my previous post re: a global vs. specific gallery setting).

    You will soon be free from my pestering. I promise.  😉

     

    Thanks.

    Tyson

    Andy
    Andy
    Keymaster

    Hi Tyson,

     

    Can you check something for me, goto DynamiX/lib/inc/gallery-grid.php and see if the following code in present

     

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

     

    if not, please place it directly below the line

     

     enhancement: function() {

     

     


    Tyson
    Participant

    Hi Andy, unfortunately this did not fix the problem. 🙁  Do you have any other suggestions?

    Thanks for your time.

    Regards,

    Tyson

    Andy
    Andy
    Keymaster

    Hi Tyson,

     

    Was it present or did you have to add it? Are you adding the Grid Gallery via the Shortcode Generator? If so you need to add via DynamiX/lib/inc/shortcodes.php and find the same line  enhancement: function() { and place directly below it.


    Tyson
    Participant

    Per your instructions I placed the code snippet into “gallery-grid.php” as the snippet was not already present.
    I have also tried with the snippet in “shordcodes.php” , also without success. I’ve tried IE 9 and FF12. I’ve also tried clearing browser cache and history.

    Below is my page shortcode:

    <p style=”text-align: center;”>[postgallery_grid content="textimage" columns="4" slidesetid="ClientGallery" shadow="shadow-xsmall" id="0" imageeffect="reflection" imgheight="140"  height="225" filtering="yes" /]</p>

     

    Any more suggestions? Have you tested the above suggestions with any success?

    Thanks for your continued efforts.

    ~T

    Andy
    Andy
    Keymaster

    Can you provide a link to your page – I’ll see what is happening.


    Tyson
    Participant

    http://www.southcoastfilmandphoto.com/

    user: andy

    pass: northvantage

     

    Thanks, Andy.

    Andy
    Andy
    Keymaster

    Hi Tyson,

     

    The script I provided isn’t present in the code. Did you definitely add it to shortcodes.php ?


    Tyson
    Participant

    Definitely. Have a look at this: http://www.southcoastfilmandphoto.com/temp/shortcodes_screenshot.JPG

    user: andy

    pass: northvantage

     

    Andy, have you tested this function in your own dev environment? Is there something unique or broken with mine?

     

    Thanks again for your time.

    Tyson

    Andy
    Andy
    Keymaster

    Hi Tyson,

     

    I’ve just realise there are two enhancement functions in shortcodes.php – search for the other one and place the code in the same place so it’s in the two different locations.

Viewing 15 posts - 1 through 15 (of 17 total)

You must be logged in to reply to this topic.