What can we do to make it easier to design with Wild Apricot?

linking to file in menu and having it open in new tab

Hi folks,

I've been playing with the page redirect script in the meta-tags of a menu item and it works great, but it performs the redirect within the same window. this is wonderful behavior sometimes, but other times, for instance when a menu item is a pdf file to be downloaded, it would be nice for that redirect to happen in a new tab. Anyone have any suggestions on how to make that happen?

thanks,

Matt

0 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)

    We’ll send you updates on this idea

    MattBeckMattBeck shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • DotCreativityDotCreativity commented  ·   ·  Flag as inappropriate

        Hello Matt,

        You would need to use jQuery to change the attribute of the menu link. First, you need to find the ID name of the menu item by looking at the HTML code of the page. The ID would look something like this: "idMainMenuItem1458190"

        Next, add the following to your Global JavaScript section under settings (substituting idMainMenuItem1458190 for whatever the ID is for your menu item, and the "document.pdf" for the file name and path):

        <script>
        try {
        $('#idMainMenuItem1458190 a').attr('href', '/resources/document.pdf');
        $('#idMainMenuItem1458190 a').attr(’target’, ‘_blank’);
        } catch (e) {}
        </script>

        Not all themes give an ID to menu items - if the theme you are using doesn't, theme override customization would be needed. If this is the case, send me an email and I'll set this up for you: ideas@dotcreativity.com http://dotcreativity.com/contact

      Feedback and Knowledge Base

      Wild Apricot Inc. 144 Front Street West Suite 725, Toronto, Ontario, Canada M5J 2L7