Opening Search-Result Topic in New Tab

Please post all questions relating to Help & Manual 6 here!

Moderators: Alexander Halser, Tim Green

Post Reply
User avatar
Jen Juneau
Posts: 18
Joined: Fri Mar 28, 2014 7:56 pm

Opening Search-Result Topic in New Tab

Unread post by Jen Juneau »

Hi, me again! I'm just full of fun questions today. :)

So right now, when a user user the full-text search to locate a topic, when they click on it, it opens in the same frame as whatever topic is currently open. We want it to open in a new browser tab for a few reasons, including but not limited to so the user can see where in our ToC tree the topic is located and get some context. Is there a simple way to configure this setting?

So far, the only thing we've figured out is replacing some code in a file called "zoom_search.js", which resides in the file's WebHelp output folder. We replaced the last line of this code with the same code as the second line (target = " target=\"_blank\"";):

if (pageinfo[ipage][PAGEINFO_LINKACTION] == 1)
target = " target=\"_blank\"";
else
target = zoom_target;

That seems redundant to me, but again, I'm not a programming guru so I'm trusting someone who is. :p

Anyway, as you know, the files in the output folder get replaced after every time you compile, so what we are trying to figure out is where the heck H&M is getting the original file, whether it's in a higher-level folder or somewhere within the project itself. I really have no idea, so if you can give some suggestions on where to look, that'd be wonderful.

Thanks SO much. You guys always come through for me, and I appreciate it a lot!

Jen
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: Opening Search-Result Topic in New Tab

Unread post by Martin Wynne »

Jen Juneau wrote:Anyway, as you know, the files in the output folder get replaced after every time you compile,
Hi Jen,

You can prevent your modified version from being overwritten every time by adding your modified version to the Baggage Files. These are added to the output folder last and overwrite any already added.

Martin.
User avatar
Jen Juneau
Posts: 18
Joined: Fri Mar 28, 2014 7:56 pm

Re: Opening Search-Result Topic in New Tab

Unread post by Jen Juneau »

That worked! Thank you for your help, Martin!

Jen
Post Reply