How to lauch the events page in a separate browser window?

Home Forums Calendar Products Events Calendar PRO How to lauch the events page in a separate browser window?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #986157
    Sridhar Mani
    Participant

    I have successfully installed the events calendar pro plugin and it seems to be working alright. I have used a short code to display mini calendar in the home page and list view of the events in inside pages. The hyperlinks in the mini calendar and list view open the events page in the same window. Due to this scenario, I cannot control the navigation of the events page to drive to the page back to the page that has mini calendar or list view of events. Hence, I would like the events page be displayed in a separate browser window, so that I can control the open/close of the events page and revert back to the page from where I launched the events page.

    I would appreciate your early help to resolve this issue for me.

    Thanks in advance.

    • This topic was modified 10 years, 10 months ago by Sridhar Mani.
    • This topic was modified 10 years, 10 months ago by George.
    #986322
    George
    Participant

    Hey Sridhar,

    You can do this a few different ways, though they almost all require custom coding which only comes with very limited support here.

    The first method would be to manually edit The Events Calendar templates and look for link tags anywhere, and add target=”_blank” to these link tags. You can learn about customizing The Events Calendar templates here → https://theeventscalendar.com/knowledgebase/themers-guide/.

    Next, you could write JavaScript that watches for click events on tribe-specific links, and sends them to a new window.

    A third option that comes to mind is to just use JavaScript to set all links on your site to open to a new window – this isn’t very efficient, but works pretty well and I wrote example script for you to use if you’re interested. Try adding the code in this Gist to your theme’s functions.php file, and see if it helps:

    https://gist.github.com/ggwicz/3b6df8fc77d322ede6bc

    Cheers,
    George

    #986518
    Sridhar Mani
    Participant

    This reply is private.

    #986599
    George
    Participant

    Hey Sridhar,

    I unfortunately cannot offer more specific help than what I shared above – we don’t offer support for customizations, but what I shared above was such a quick thing to write that I threw it together as an example.

    To improve upon that and do what you want, you can use jQuery and just modify that function I shared above. Use your browser’s Web Developer tools to find the class names for specific links you want to open in a new window, then simply watch for them by using jQuery’s .click() function and send the link to a new window.

    There are fortunately many ways to go about doing that specifically, so take some time online and find what works best for you → http://www.google.com/search?q=jquery+send+link+to+new+window

    To add the code to your site, you can just do what I recommended above which is to take my function and just replace the JavaScript I used with JavaScript that you’d like to use.

    Best of luck with your customizations and your site!

    — George

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘How to lauch the events page in a separate browser window?’ is closed to new replies.