1 Reply Latest reply on Jul 11, 2013 7:01 AM by Willam van Weelden

    Automatically closing all other TOC books - a solution (is there a better one?)

    Rsfl Level 1

      Hi all,

       

      I wanted the WebHelp to automatically close the open books when I open a topic in a book. Thus only displaying the contents of one book at a time.

       

      After some fiddeling I found this solution. It is sort of slugish do to the reload though, maybe someone knows a better way?

       

       

      First, add Willams scipt to always show the navigation pane:

      http://www.wvanweelden.eu/blog/2012/08/01/always-show-webhelp-navigation-pane

       

      Then open the whtdata0_xml.js file and change all items adding  the attribute target=\"_top\" . You can do this using a search & replace.

       

      For example, this item element:

      <item name=\"topic_title\" url=\"mytopic.htm\" />

       

      must be changed like this:

      <item name=\"topic_title\" url=\"mytopic.htm\" target=\"_top\" />

       

       

      This forces the page to reload each time, which closes all other books except for the current one.

       

      Robert