I inherited a RoboHelp v9 WebHelp Pro project in which the master page includes the follow text/hyperlink.
I think that it's supposed to show more or less drop-down or expanding text. But it doesn't work. Here's what happens:
The Baggage files folder includes twisty2a.js, which is included in the Help output folders.
All help, as always, always appreciated.
The name of that file suggests it was probably downloaded from my site, or possibly Willam van Weelden's. Both sites have instructions for using the script.
In each topic the path to the JS file has to be set as I describe. I suspect the problem is that your master page has a path that does not work for the topic.
See www.grainge.org for RoboHelp and Authoring tips
Given the fact that the file name is twisty2a.js, I believe you use my twisty method that Peter provides on his site.
The following should fix it: On line 55, set the variable OneButtonMethod to false.
Thanks, William. You and Peter have provided me some useful information. Now I just need to figure out how the previous writer set things up and then fix the project. Here are some notes about the project, which I am trying to troubleshoot:
Here's what I think I need to do:
If the master page includes the Show All | Hide All buttons in every topics and there are no drop-downs in the topic, may I assume that they simply do nothing?
When you add the ShowAll/HideAll to the master page, the links will be visible regardless of whether dropdowns/expandspots are used on that page. If you do not want that behaviour, you will need a script to check for dropdowns/expandspots and then show the links.
I've been trying to follow Peter's instructions, but am having some difficulties.
A twisty is the image shown before the drop-down link. The show/hide buttons are the images you use for setting up the show and hide all capabilities.
You can also add the script to the header section of the master page. That way you won't need to reference the script on every topioc separately.
The arrowright and arrowdown are the default image names used for the twisty. You don't need to change them if you don't use twisties.
You can't add the onclick event through the image properties. Go to HTML mode and add an attribute onclick="Code here" to the images.
Thanks again, William.
Now I understand what the twisty images are. I've never used them, always just accepted whatever RoboHelp included with the drop-down hot spot.
Here's what I've done:
I didn't add the OnClick event yet because I wasn't sure where to add the attribute in the HTML code.
The Show All works beautifully in some topics, but not in all. For some reason, and this may be the subject of another forum post, the updates to the Master page are not being applied to every page that uses the Master page. For example, the Application Home page topic looks like this:
When I compare the HTML code for this page to the HTML code for a topic where the Show All/Hide All works, the header includes the reference to twisty2a.js. Do you think that this is a RoboHelp issue that I need to report and that, as a workaround, I need to manually add the script reference to every topic now?
<td><h2><img src="btnshowall.gif" onclick="ShowAll(this)" alt="" style="border: none;" border="0" /></h2></td>
Thanks again to Peter, Rick, and William for all your thoughtful and speedy assistance.
I'm using RH9.
William suggested adding the script to the header section of the master page, to avoid having to reference the script on every topic separately.
Unfortunately, the workaround appears to be that I need to copy the ‘script type’ line into all the old topics that don’t take the master page changes.
I tried setting master page to “none” and then reapplying it, but that didn’t work either.
You are seeing what I call the "Master Page Conundrum" at play here.
Master Pages are used in two completely different ways.
The first way is similar to using a copier. Imagine you have a form where you want to collect information at some event. So you create the form and it has places for the Name, Address, Phone Number, etc. You place the form inside the copier and make 20 copies. Each copy made looks identical to the other until the areas are completed by the person you handed the form to.
Later it occurs to you that it would be handy to also ask for their email addresses. So you amend the original form. Now those first 20 copies aren't going to magicakally see a new field appear where someone can fill in their email address, right? Only NEW copies made from the amended form will get that. Same goes for Master Pages. The first way they are used is to serve in much the same capacity as the form example. Any changes made to the topic once it has been created aren't reflected in topics that were created from the master page.
The *SECOND* way Master Pages are used is to easily propagate Headers and/or Footers across existing topics. So you set the Master Page up so that it has a Header and/or Footer, then you associate it with as many existing topics as you want in order to give each of these topics the same Header and/or Footer. If you make changes to the Header or Footer in the Master Page, those changes *ARE* reflected in all topics linked to the Master Page.
Hopefully this helps demystify things a bit... Rick
Thanks for the additional explanation about the conundrum, Rick!
As far as the first "copier" usage, I assumed that changes made to a regular (non-Master Page) topic would not be reflected in any other topics that use the same Master Page.
However, I also assumed that changes made to content on a Master Page would be reflected in topics associated with the modified Master Page. I just did a brief test:
In this scenario, using your "copier" usage method, adding an email address to a Master Page 'form' would add the email address to all topics associated with the modified form.
In the second method, using Master Pages to propagate Headers and Footers across existing topics, I assumed that adding the twisty script to the <head> section in the Master Page would propagate that change across existing topics. However, I may have confused the <head> section with the "header" type area. If I change an image in the header, the change is correctly reflected in all topics that use the Master Page.
Assuming that twisty2a.js is (1) in the root folder, (2) is set up to use the “One button ShowHide only” method, and (3) has been added to the Baggage Files folder:
Note: If you don’t click the Design tab before saving the change, RoboHelp thinks you are making a change to the Master Page and may prompt you to apply the change to all topics associated with the Master Page. Sometimes this results in the images disappearing from the Master Page header area! You then have to insert them in the Master Page again. If you choose not to apply the change to all topics associated with the Master Page, RoboHelp tells you that you are breaking the link to the Master Page for that topic (which is not always true!).