Always Show WebHelp Navigation Pane

Always Show WebHelp Navigation Pane

When a user opens a topic in WebHelp directly, the navigation pane is not visible. In the properties of the SSL, you can choose to show a link when a topic is opened directly. With a simple script, you can force WebHelp to always show the navigation pane.

RoboHelp 9 and below

For RoboHelp 9 and below, you can add a script to the footer of your master page (template in RoboHelp 7) :

  1. Go to your master page and select the footer.
  2. Click Insert > HTML > Advanced > Script...
  3. On the Source tab, add the following JavaScript:
if(typeof(whMessage) != "undefined") {
  var panevisible = new whMessage(WH_MSG_ISPANEVISIBLE,this,1,"");
  if(!SendMessage(panevisible)) {
    show();
  }
}
  1. Click OK to add the script to the master page.
  2. Save the master page and generate your output.

Note: Make sure the master page is assigned to all the topics. If you use multiple master pages, add the script to all your master pages.

RoboHelp 10 and 11

For RoboHelp 10 and 11, you can add a script to the footer or the header of your master page:

  1. Go to your master page and select the header or the footer.
  2. Click Insert > HTML > Advanced > Script...
  3. On the Source tab, add the following JavaScript:
if(isTopicOnly()) {
  setTimeout('show()', 100);
}
  1. Click OK to add the script to the master page.
  2. Save the master page and generate your output.

Note:

  • Make sure the master page is assigned to all the topics. If you use multiple master pages, add the script to all your master pages.
  • When you find that a topic keeps reloading constantly, increase the number 100 to another value. The number stands for the milliseconds the script has to wait before executing. 100 means that the script will wait one tenth of a second before calling the skin. By increasing this number, other scripts on which this method depends are allowed more time to execute.

Comments

Karen Graf's picture

Hello,
Thank you for sharing the information regarding how add a script to the footer of a master page to force the navigation pane to be visible.  It is working fine when I test the published WebHelp from the application.  However, when I'm in RoboHelp (v9) and I choose to Preview the topics, I receive a "Script Error" message that states that the "'whMessage' is undefined".
This is how the script appears in my footers:
________________________________________________________________
 
<div style="width: 100%; position: relative;" id="footer">
 <hr style="color: #f0f0f0; background-color: #f0f0f0;" size="6" align="center">
 <table cellspacing="0" width="100%">
  <col style="width: 50%;">
  <col style="width: 50%;">
  <tr style="height: 22px;">
   <td style="vertical-align: top;"><img src="..\SkinsPics\SmallLogo.png" alt="" style="border: none;" border="0"></td>
   <td style="vertical-align: top;">
   <p class="CopyrightText">Copyright
    <?rh-symbol_start name="Copyright" ?>©<?rh-symbol_end ?> 2013
    by CNC Software, Inc.</p>
   <p class="SmallText">&#160;</p></td>
  </tr>
 </table>
 <p class="SmallText">
<script type="text/javascript" language="JavaScript1.2">var panevisible = new whMessage(WH_MSG_ISPANEVISIBLE,this,1,"");
if(!SendMessage(panevisible)) {
  show();
}</script></p>
</div>
</body>
</html>
________________________________________________________________
 
Have you seen this?  Have I missed something?
Thank you!
Karen Graf
Senior Technical Writer
CNC Software, Inc.
 

Willam van Weelden's picture

Hi Karen,

The script doesn't account for preview, so the problem is most likely in the script. Try this updated script;

if(typeof(whMessage) != "undefined") {
  var panevisible = new whMessage(WH_MSG_ISPANEVISIBLE,this,1,"");
  if(!SendMessage(panevisible)) {
    show();
  }
}

Note: I've also updated the post.

Sylvain's picture

Thanks for sharing this.
I've tried to use the script you provided for RH 10, but I'm getting an error that says "ifTopicOnly" is undefined. Any ideas?
Do you have an updated version for this one as well?

Willam van Weelden's picture

Are you creating WebHelp? This method may not work on other outputs. Where have you added the script? I've just given it a spin and it seems to work on my side.

Sylvain's picture

I'm working with a Webhelp project.
I added the script at the bottom of a page, before the </body> tag. I do not use master pages however. Does it work with master pages only?
Thanks for the info.

Willam van Weelden's picture

It will also work when you add it to pages directly. I recommend master pages because then you only need to manually add the code on every page.

Chris Tilden's picture

Hi,
I have conditionalized help (in RoboHelp 9) for two products (same source files and Main page). I have added this script to my main page, however when I output for one product, it works fine. When I ouput for the second product it doesnt work. Any suggestions? Is there something in the script preventing this to only work for one output?
 
Thanks for your help

Willam van Weelden's picture

That's very strange. If you open the topic in the output, is the script in those topics? Otherwise the master page could be overridden in the SSL settings.

Also, do you receive any script error in the browser in the second output?

Is the section where the script is located conditionalised?

Chris Tilden's picture

I am using RoboHelp 9 and conditionalizing for two products. When I add this script, it works for one product output, but doesn't work for the second product output. They are both using the same source files and the same master page. Any suggestions? Anything inthe script that should change?

Chris Tilden's picture

Thanks William. I think I fixed it. It might have to do with the SSL settings. In the WebHelp Setting dialog, I selected "Apply to all Topics," then selected Master Page. Previous to this, this option wasn't selected, but the CSS option was selected (and grayed out). It seems to have fixed the problem! Thanks for your reply.

Peggy Frizzo's picture

Is adding the script to the header supposed to force the TOC pane to stay open no matter what?
I am using RoboHelp10 and creating WebHelp. I created a master page with the script in the header and applied it to every topic. I also have the show/hide button for showing/hiding the TOC pane. When I run the help and click Hide to hide the pane, it pops back open. Is there a way to allow it to close if the user wants to close it? thanks

Willam van Weelden's picture

The script should only show the pane when the help is loaded without the skin showing. It may be that the waiting time is too short. Try changing 100 to 500 and see if that helps.

If you want to use a show/hide buttons for the pane, you can also call your help with a context sensitive help call. This method is quite invasive and may not always have the desired effect.

Teja's picture

What do I do if I want to display the navigation pane for webhelp that is invoked in context sensitive manner using map id or map number? I am currently seeing only a Show/Hide button that invokes the navigation pane when clicked.
Should I be passing the window name of a 2 pane window like the default WebAppCSH  to the CSH API to always display the navigation pane with the context sensitive topic?

Willam van Weelden's picture

You can use this method, but there is a better way for context sensitive help. It is a two step process:

  1. Create a window definition with a Two Pane view.
    Window definition (click to enlarge)
  2. Amend the CSH call to include the name of the window you've created. You can do this in the default api, or when you have a custom call, specify the correct parameter. For more info on the CSH call, see Context Sensitivity in WebHelp and FlashHelp - Regular start page
Teja's picture

Thank you, William. I will try this out.

Teja's picture

Thanks, William! The creation of new window helped. I didn't have to do anything more than that as the developer had already used a window name. So I simply created a 2-pane window with the same window name and it worked.

Gayle's picture

Hi - Do you know the script for Robohelp 11? I tried the one for RH 10, but it doesn't appear to be working.

Willam van Weelden's picture

I tested the RH10 version on RH11 and it worked perfectly for me. Did you make sure that the Master Page is applied to all topics?

If you open a page, does the browser give you a script error?

Gayle Ferreira's picture

Hi William,
It worked this time. Thank-you! When opening up the topics from Window Explorer, I get the navigation pane for every topic, not just the Start page. Yeah!
But for CSH, I will either need to get the name of the window from the developer and create the same name with a Two Pane view (as mentioned by Teja above) or create a new window with a Two Pane view and have the developer pass it.
Will let you know the outcome. Thank-you!
 
 
 
 

Joel Chang's picture

This is a huge help, appreciate the support you've provided to the community as well. Thanks,

Kurt's picture

Hi Willam

Many thanks for your useful pieces of information regarding RoboHelp on your website.

I've got the same problem that Sylvain reported on September 9, 2013. The problem is that this script error ("isTopicOnly" is undefined) appears in RoboHelp11, when I preview a topic, not in the WebHelp output! In the WebHelp output, everything works fine.

I just upgraded from RH9 to RH11 and am now a bit lost. Your help is very much appreciated; thanks.

Best regards,

Kurt

Willam van Weelden's picture

The preview is a little bit different from the actual output and that's why the error is occurring. You can use the following script if you don't want tot see the error in preview:

if(typeof(isTopicOnly) != "undefined") {
   if(isTopicOnly()) {
     setTimeout('show()', 100);
   } 
}
Kurt's picture

Willam,

Sorry for my late reply, but your solution from June 7 fixed the problem; thanks a lot!!

Cheers,

Kurt

Add new comment

Latest Tweets

Shopping Cart

View your shopping cart.

Recent Content

Using JavaScript Syntax Highligher in RoboHelp
published 2 weeks 3 days ago
Adobe RoboHelp: Show Variables in Topics
published 2 weeks 5 days ago

Copyright WvanWeelden Consultancy. All rights reserved. - Terms and conditions - Privacy policy - Taxes apply to all prices. Back to Top

Back to Top