Custom Top Navigation Links URL Question

105 views
Skip to first unread message

njenney

unread,
Dec 18, 2009, 7:13:51 PM12/18/09
to ResourceSpace
Does anyone know how to spawn a URL in a new window? I tried the
traditional HTML syntax but I cannot get it to work.

The reason I would like to do this in a new window is because I have
the 'My Collections' as a frame at the bottom and it still displays
when the external site is displayed.

Thanks.

# Custom top navigation links.
# You can add as many panels as you like. They must be numbered
sequentially starting from zero (0,1,2,3 etc.)
# URL should be absolute, or include $baseurl as below, because a
relative URL will not work from the Team Center.
#
$custom_top_nav[0]["title"]="Google";
$custom_top_nav[0]["link"]="http://www.google.com/" target="_blank";

Blue-J

unread,
Dec 19, 2009, 11:21:08 PM12/19/09
to ResourceSpace
since it's just asking for a path and not a string that would also
include the target parameter, this won't work without changing the
codebase.

another way to put it: the config parameter doesn't know that your
link didn't stop after "....com/"

-J

njenney

unread,
Dec 20, 2009, 12:07:04 PM12/20/09
to ResourceSpace
That is what I thought. Thanks for your reply.

Mike Walter

unread,
Nov 28, 2014, 4:57:48 AM11/28/14
to resour...@googlegroups.com
I know this post is quite old, but it's the only on I could find in searching for my Problem and now I found a solution and wanted to share it with you.

All you need to do, is to inject the href-attribute within the variable.

For Example:

$custom_top_nav[0]["title"]="Example Link A";
$custom_top_nav
[0]["link"]="mytargeturl\" onclick=\"\" target=\"_blank";

\" ends the href-attribute
onclick=\"\" overrides the procedure, which tries to wrap the called page into the content div from the main-page (guess only, because I don't really understand what the devs were doing here)
target=\"_blank opens the link in a new window/tab (depends on browser and settings).

Mike Walter

unread,
Nov 28, 2014, 7:38:44 AM11/28/14
to resour...@googlegroups.com
Somehow my previous post isn't shown here, so I repost it.

I got a solution to this problem and wanted to share it, because it's the only thread I could find using Google-Search-Engine.

You have to inject the href-attribute which is stored in $custom_top_nav[0]["link"]

$custom_top_nav[0]["title"]="Example Link A";
$custom_top_nav[0]["link"]="url \" onclick=\"\" target=\"_blank";


Jumanne

unread,
May 27, 2024, 9:27:43 AMMay 27
to ResourceSpace
Thanks! This still works, but I was trying to achieve the other way of opening the page in the same tab as it now seems to open a new tab by default.
So I used target=\"_self";

Reply all
Reply to author
Forward
0 new messages