Skip navigation
mario_gudelj 1,679 posts
Oct 13, 2010
Currently Being Moderated

Target attribute in BC Dynamic menus?

Apr 30, 2012 3:44 PM

Tags: #menu #target #new_window

Question:

 

Is it possible to add a target attribute to a link that appears in a BC dynamic menu?  I'm adding a few things to external sites and want a new tab / window opened ("_blank") rather than the default ("_self" ) behavior.  Can this be done?

 

 

Answer:

 

If you go to Site Settings -> Menu -> select a menu and then click on the menu item you want to open in a new window, you'll find a Target Frame field on that page. You need to place _blank into that field and it will be rendered on the frontend as a target="_blank" attribute.

 
Replies
  • Currently Being Moderated
    Apr 30, 2012 2:40 PM   in reply to mario_gudelj

    Hi Mario,

     

    I have my two links in my menu that need to open in a new window and in the Target frame field I have placed _blank but it still opens in the same window, any idea on what may be causing it?

     

    my site:  clawmoney.businesscatalyst.com

     

    the two menu items that need to open in a new window: "BLOGUE" and "CLAWFEE TALK"

     
    |
    Mark as:
  • Liam Dilley
    6,690 posts
    Feb 28, 2012
    Currently Being Moderated
    Apr 30, 2012 4:16 PM   in reply to leilanim14

    Hey there..

    Couple of questions..

     

    - Did you use the Version 2 menu module?

    - You using the menu module at all?

     

    The way that menu is html and javascript is does not appear to be using the BC menu module. When you change a link or text in the admin is your menu updating?

     

    If it is the Version 2 you need to update the menu layout to include that.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 30, 2012 4:31 PM   in reply to Liam Dilley

    Hi Liam,

     

    Thank you for the quick reply, I'm not sure what version of the menu module I'm using, I attached a picture of what it looks like below

    Screen shot 2012-04-30 at 4.30.12 PM.png

     

    I entered _blank in the target frame field for the menu item that I want to open in a new window and it shows as saved. How do I update the Version 2 menu?

     
    |
    Mark as:
  • Liam Dilley
    6,690 posts
    Feb 28, 2012
    Currently Being Moderated
    Apr 30, 2012 5:22 PM   in reply to leilanim14

    Hey, I mean in terms of your HTML Templates.

     

    I am guessing your not using that at all and its manually entered into the html.

     

    If you do not see something along the lines of {module_menu} but just html with a <div id="nav">and a ul li element with menu items in it then its just static.

    You would have to update the templates with the correct menu module tag which has the right ID for the menu and then you would need to update the CSS and javascript too so it all works.

    If it turns out the module is in there but has a bit like version="2" I can then show you what you need to update there.

     

    Have a look in your templates around where the menu is in the HTML, what do you see?

     
    |
    Mark as:
  • Currently Being Moderated
    May 1, 2012 12:27 AM   in reply to Liam Dilley

    I looked into the html of my page template and here's what I found:

     

    <p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal helvetica; color: #777777;"><span style="line-height: 12px; font-family: helvetica, arial, sans-serif; color: #000000;">{module_menu, version="2", menuId="906940", moduleTemplateGroup="Default"}</span></p>

     
    |
    Mark as:
  • Currently Being Moderated
    May 13, 2013 11:17 AM   in reply to leilanim14

    I know this is old, but in case someone else needs to know how to fix this...

     

    In the "Develop" tab or FTP, navigate to:
    - ModuleTemplates
       - Menu
          - Default
             - childitem.html


    and add this to the <a> tag:

    target="{tag_menuitemtargetframe}"

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 12, 2013 10:17 AM   in reply to psteil

    Very helpful fix to this bug!

     
    |
    Mark as:
  • Liam Dilley
    6,690 posts
    Feb 28, 2012
    Currently Being Moderated
    Sep 12, 2013 3:01 PM   in reply to tallorder49

    No bug. That is not valid XHTML so if you use the V2 menu option you choose to include it or not.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points