Link from custom topic toolbar button (top nav)

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
qtxasjo
Propeller Head
Posts: 37
Joined: Tue Oct 16, 2007 5:06 am
Location: Europe

Link from custom topic toolbar button (top nav)

Post by qtxasjo »

I am trying to add a new button in the topic toolbar (top nav output), next to the Print, Expand/Collapse All etc buttons. The button should link to a specific help topic but I have run into problems with the link to the topic.

The problem is that the output is published in two different folders on the web server so I can't create an absolute link (unless I want to build the output twice each time). And from what I have gathered so far I can't add a relative link either?

To recap what I have: I created the button in the topic toolbar skin, added an image, set the padding etc. Under Event, I added "window.location = "/helptopics/help.htm"".

I guess it would work if my help files were located directly under the domain root on the web server but unfortunately the structure on the web server looks like this:

/
/online_version A/helptopics/help.htm
/online_version B/helptopics/help.htm

This means that when clicking the button I'm taken to http://www.example.com/helptopics/help.htm instead of http://www.example.com/online_version A/helptopics/help.htm or http://www.example.com/online_version B/helptopics/help.htm, depending on which version I'm in.

It seems like an easy enough thing to do but I'm stumped, does anyone have any good ideas on how to create a button like this with a relative link?
Michelle_Gardner
Propeller Head
Posts: 24
Joined: Mon Apr 14, 2014 10:22 am

Re: Link from custom topic toolbar button (top nav)

Post by Michelle_Gardner »

I created the button in the topic toolbar skin, added an image, set the padding etc. Under Event, I added "window.location = "/helptopics/help.htm"".
@qtxasjo, how did you create the topic toolbar button? I want to do the same thing and link it to a Web site. Thanks!
qtxasjo
Propeller Head
Posts: 37
Joined: Tue Oct 16, 2007 5:06 am
Location: Europe

Re: Link from custom topic toolbar button (top nav)

Post by qtxasjo »

Hi Michelle, I took my print button and changed the icon on it in Photoshop (just a lazy way of getting the same size and background colours etc as on the other images in the toolbar). I then went to the TopicToolBar skin, and created a new style for the button under the Setup tab (using the very tiny icon with a wrench on it down in the left corner) and moved it to under Selected. I could then find my new style in the Styles tab under Toolbar Button. I added my image under Background and copied the rest of the settings from the Print button styles so they had the same padding etc. Under Event, you need to add this code:

Code: Select all

window.open("http://www.example.com");
Post Reply