Answers.Body: <p>Creating a custom extension following <a href="https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_navigationMenu/" rel="nofollow noreferrer">this doc</a> was the best and quickest solution.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-29T07:38:01.547Z
Answers.LastActivityDate: 2021-10-29T07:38:01.547Z
Answers.UserDisplayName: Guillaume Sorel
Answers.Body: <p>You can't do it because it's controlled by an attribute on the <code>&lt;a&gt;</code> tag. It would be possible with some extra jquery you add to all pages that updates the <code>&lt;a&gt;</code> so it has <code>&lt;a target=&quot;_blank&quot;...&gt;</code>.</p>
  <p>But just a warning some people don't like it when you decide for them. If they want to open in another window they can right-click and choose that.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-29T07:35:09.243Z
Answers.Text: thanks Dave, we've done it differently with an extension
Answers.UserDisplayName: Guillaume Sorel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-11-05T12:42:42.820Z
Answers.Text: FWIW, if you're using Drupal, you can also do this with the external link module (which implements @Demerit's javascript stratagey). If you're doing it as a general useability policy for the whole site, it makes sense to do it at the theme level instead of hardcoding it into civicrm.
Answers.UserDisplayName: Alan Dixon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-27T18:26:11.247Z
Answers.LastActivityDate: 2021-10-27T18:26:11.247Z
Answers.UserDisplayName: Demerit
Body: <p>I need to add some external links to the menu bar and I want them to open in a new tab.</p>
  <p>I've unsuccessfully tried variations around <code>https://domain.net/page?target=_blank</code></p>
  <p>Is this possible through the UI?</p>
  
Tags: <user-experience>
Title: Menu bar editor: how to add a target="_blank"?
ThreadText: # Menu bar editor: how to add a target="_blank"?
  
  (Asked by: username_0 on 2021-10-27)
  
  I need to add some external links to the menu bar and I want them to open in a new tab.
  
  I've unsuccessfully tried variations around `https://domain.net/page?target=_blank`
  
  Is this possible through the UI?
  
  **Tags:** user-experience
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2021-10-29. Score: 1 | Accepted answer
  
  Creating a custom extension following [this doc](https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_navigationMenu/) was the best and quickest solution.
  
  
  ---
  
  ### Answer by username_1 on 2021-10-27. Score: 2
  
  You can't do it because it's controlled by an attribute on the `<a>` tag. It would be possible with some extra jquery you add to all pages that updates the `<a>` so it has `<a target="_blank"...>`.
  
  But just a warning some people don't like it when you decide for them. If they want to open in another window they can right-click and choose that.
  
  > **Comments:**
  > **username_0**: thanks Dave, we've done it differently with an extension  
  > **username_2**: FWIW, if you're using Drupal, you can also do this with the external link module (which implements @username_1's javascript stratagey). If you're doing it as a general useability policy for the whole site, it makes sense to do it at the theme level instead of hardcoding it into civicrm.  
  
  ---
  
  