3 Replies Latest reply: Jun 17, 2014 3:24 AM by Vishabh Gupta RSS

    Why is TOC and Index connected at the hip.

    Troubleshooter Community Member

      Why do you have to have TOC and Index tabs together? Why can't you have one without the other?

        • 1. Re: Why is TOC and Index connected at the hip.
          Captiv8r CommunityMVP

          Hi there

           

          It's possible to have a TOC and no  Index. It's also possible to have and Index and no TOC. Just  create a project that has nothing in the TOC or the Index and compile. I tested this earlier to confirm my suspicions and here is what I found.

           

          tmp1.png

           

          Cheers... Rick

          • 2. Re: Why is TOC and Index connected at the hip.
            Troubleshooter Community Member

            Thanks Rick,  I'll give it a try.

             

            Worked great. I thought I might want some day to use the Index so I created a new index name called "Empty Index" and set it up as the one to use on a build and no Index tab after a build. Thanks again Rick;    Mike

            • 3. Re: Why is TOC and Index connected at the hip.
              Vishabh Gupta Adobe Employee

              Hi

              You can hide tabs even after generating the Help file. You can have all three (TOC, Index and Search) or anyone or two of them as per your requirement. you just need to understand the internally javascript is running and you can make changes from the js files also. It it possible via editing the Whbar.js file from the project folder.

              Say, for example- if you want to have only Content (TOC) and Search, and no Index tab; follow the below steps. 

               

              1. Edit the Whtbar.js file

              2. Go to function addButton

              3. Comment the code inside Else If (see below) and save the js file again.

              4. Open index.htm file again, you will not see index tab anymore.

              Same you can do for other tabs to hide them.

               

              else if(sType=="idx")

                  {

                      var svTitle="Index";

                      /* Comment this code

              sButton="<a title=\""+svTitle+"\" id=\"btnidx\" class=\"btnidx\" href=\"javascript:void(0);\" onclick=\"showIndex();return false;\">";

                      if(!sI1)

                          sI1=gsIIndex;

                      if(!sI2)

                          sI2=gsIIndexS;

                      if(!sI4)

                          sI4=gsIIndexS;

                      goIdx=new button(sType,sTitle,nWidth,nHeight,sI1,sI2,sI3,sI4,sI5,sI6);

                      gaObjBtns[nBtn]=goIdx;

                      if(nStyle&BTN_TEXT)

                          sText=goIdx.sText

                         

                      if(nStyle&BTN_IMG)

                          sI=getImage(goIdx,svTitle);

                      sButton+=genButton(sText,sI,nStyle);

                      sButton+="</a>";

                      bState=true;

               

              comment code */

                  }