Map Event Links open in New Tab

Home Forums Calendar Products Events Calendar PRO Map Event Links open in New Tab

  • This topic has 0 replies, 2 voices, and was last updated 6 years ago by techuser.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1484752
    techuser
    Participant

    Hello,

    We are looking to have our maps event links (inside the selected pins pop up box) open in a new tab automatically using HTML target attribute. I cannot seem to find where the <a href is generated in the PHP for the event link that pops up in the map when you select a pin for the event.

    #1486526
    Patricia
    Member

    Hey Eric,

    Thank you for reaching out to us!

    The link is generated via JavaScript on:

    events-calendar-pro/src/resources/js/tribe-events-ajax-maps.js line 59.

    It’s certainly possible to modify this file and achieve what you want, but remains something that we do not support “out of the box”: some amount of custom dev work would be required to make this happen.

    To help you get started, you can use one of our extensions as an example:

    https://theeventscalendar.com/extensions/google-maps-multiple-events-same-venue/

    This extension overrides the default tribe-events-ajax-maps.js file: you can use it as an example/starting point to build your own code.

    I hope this helps! If you have any other questions at all please feel free to let me know and I’d be happy to help as best I can!

    Cheers,

    Patricia

    #1488636
    techuser
    Participant

    This alteration seemed to do the trick at line 58:

    content_title = $( ‘<div/>’ ).append( $( “<a/>” ).attr(‘target’, ‘_blank’).attr( ‘href’, link ).text( title ) ).html();
    }

    #1488911
    Patricia
    Member

    Hi Eric,

    Thanks for sharing your solution! If you need an assistance again or have other concerns, please feel free to open up a new thread, we’ll be more than happy to help you!

    Cheers,

    Patricia

    #1509425
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Map Event Links open in New Tab’ is closed to new replies.