A useful button to have on your toolbar is one that will take the
user from any topic to the default topic.
This topic describes how you can do that.
If the target is part of your parent project,
the steps are very easy.
There's a little more to it if the target is in
a child project as it would be using my Merging
WebHelp - New Method. Nonetheless it is still straightforward.
Target in Parent Project
Double click the skin and click the Add icon
In the Text tab displayed, enter a name for the
icon, any text the user is to see and create a link to an image.
Now click the Action tab and browse to the target
topic.
Click OK.
In the generated and published help, that button will now take the user
to the target topic, no matter where they are in the system.
Target in a Child Project
The initial steps are exactly the same as above. The catch is that because
the target is in another project, RH very kindly copies the topic into
the skin folder for the parent project.
What's wrong with that?
The link to the style sheet will be messed up
so the topic will not even look correct.
Any changes you make to the "real" topic
will not be reflected in this copy.
Any links will have the wrong path and will break,
thereby defeating all the work that went into keeping all the links in
the child projects!
Fortunately it is easily fixed.
Before you generate and publish, delete the copy
topic file from the skin folder in the parent project. That, not surprisingly,
prevents the copy being included in the generated and published folders. You
probably only need to do this once, when you add the button. It may be though
that other changes to the skin will grab a copy again so check when you change
things.
Next go to the generate / publish folders and
find the whskin_tbars.htm file and open it in a text editor such as Notepad.
Near the end of the file you will find a line
that you should recognise as being the parameters for the button. It will
look something like this
You just need to amend the bit shown in red to
include the path to the topic in the child project using forward slashes.
It will look something like the line below.
Save the change and it should now all work from
any topic in any project.
Provided you do not change
the skin in any way AND do not select the Republish All Files check
box in the wizard, I have found this file will not get overwritten
in the published help. It will however get overwritten in the generated
help.
If you change the skin,
the file must be recreated and the amendment made again.
If you do not amend the skin but do choose
to Republish All Files, then it will get overwritten. You might like
to keep a copy of the
edited file to replace the newly created file.