Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Keep non-atlassian locations in frame with application navigator

Maxim Van Gelder July 29, 2013

I love the application navigator that's in Confluence 5.

We have multiple applications that are not from Atlassian and opening them via the navigator navigates away from confluence and leaves the user with no "way back" to where he was.

Is there a possibility to open other applications in a(n) (i)frame or something similar to keep the user within the confines of confluence?

Thanks in advance!

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Tim
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 29, 2013

I do not think, that Confluence 4.x nor Confluence 5.x, have provided a nice configuration for this. Instead you could try and add this JavaScript to the CustomHTML snippet in your Confluence admin section. I did not test it, as I do not have Confluence 5 but it should open all external links within the navigator in a new tab/window.

<script type="text/javascript">
    AJS.$("#app-switcher .nav-link a").not(".nav-link-local").attr("target", "_blank");
</script>

Confluence 4.3.7 is automatically adding a css class "external-link" to every link with a href that is not pointing to the Confluence server URL. So you need to identify these links with JavaScript and add the target attribute.

For Confluence 5.x this seems the other way around. Internal links are now getting the class "nav-link-local" so you now must get all the links which do not have that class.

Maybe you have to tweak the script a bit, if the classes are not matching correctly but you can accomplish your goal with this approach definitely.

0 votes
Maxim Van Gelder August 5, 2013

It doesn't show the plain text anymore now but applications are still opened in thesame window. Never the less I'm researching other options.

The question was more along the lines of "Did I miss this option in the config or what?"

0 votes
Maxim Van Gelder July 30, 2013

Tried in all three places where it could go. End of header, start of body, end of body. The code isn't parsed, it just shows it on the page.

I'll work something else out. Thanks anyway!

Tim
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 31, 2013

End of Body should be fine, I added the missing script tag to the code, it may work now.

TAGS
AUG Leaders

Atlassian Community Events