0

Is there a way to set the upper right hand website link in the CP to open in a new window or tab?

Thanks!

3 Answers 3

2

You could use the CP CSS & JS add-on (download link) to inject JS to add the attribute to the link?

$('#navigationTabs .msm_sites a').attr("target", "_blank");

Tested on EE v2.9.2 & v2.5.3. Don't worry about the msm reference - it's marked as that even if you don't have MSM installed.

2
  • That addon hasn't had a commit in 4 years, which makes me weary, but if you've tested it and it works, than your answer is cleaner than mine. Upvote!
    – jrothafer
    Commented Apr 11, 2015 at 18:09
  • It's not a complex add-on, so no need to fix or improve. Pixelandtonic are a good development agency too. Commented Apr 12, 2015 at 6:30
1

I would suggest downloading a custom theme, and modifying the Javascript includes for that theme. All you should need to add to that file is this line:

$( '.first_level:last-of-type' ).attr('target', '_blank');

And that should hit the last button on your top level menu, which will be the redirect link to your site. Good luck!

ps this was tested in EE 2.5, not 2.9+, but I doubt they've changed class names in the CP when still in the same version. Subversion changes like that would break theme compatibility too badly.

0

Simple. You could edit menu.php file. It's located in system/expressionengine/libraries folder. You must go to the line 321 and change it so:

$menu_string .= $this->_process_menu(array('help' => $this->generate_help_link()), 0, TRUE, '', 'external');

Byez

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.