3 Replies Latest reply on May 25, 2010 5:55 AM by Willam van Weelden

    change TOC level colors

    Nick@Tag Level 2

      RH8 HTML

      Hi all,

      Ive had a request come through about changing the level colors in the TOC for a webhelp project.

      As far as I'm aware you can only set a single color in the skin settings within RH, however I'm trying to track down the output file where this is set, and perhaps add some extra code to set the different level colors.

       

      Anyone know which file, or piece of code is controlling this?

       

      Thanks,

      Nick

        • 1. Re: change TOC level colors
          Willam van Weelden Adobe Community Professional & MVP

          Hi Nick,

           

           

           

          I'm not sure what you want to change. Do you want to change the text colour, the image, the highlight colour, a combination of those?

           

           

           

          Anyway, the files you're looking for are whtdhtml.htm, whthost.js and probably whutils.js. Be sure to check out Rick's Skinny on Skins<http://www.robowizard.com/RoboWizard/NewProject.htm#Downloads/Skinny_on_Skins.htm>. It might just contain what you’re looking for.

           

           

           

          Greet,

           

           

           

          Willam

           

          This e-mail is personal. For our full disclaimer, please visit www.centric.eu/disclaimer.

          • 2. Re: change TOC level colors
            Nick@Tag Level 2

            The text color of the different levels.

             

            i.e

            - level 1

                 - level 2

                      . level 3

            • 3. Re: change TOC level colors
              Willam van Weelden Adobe Community Professional & MVP

              Hi,

               

              You can use css to get that effect. You can amend the function TocWriteClassStyle in whthost.js or you can create a style sheet/style block.

               

              The regular colour of the text is controlled by 'A' (the're links). This is the top level of the TOC. All deeper levels are divs with the class '.child'. So '.child A ' make the second TOC level black. '.child .child A ' makes the second level red. I tried this on a four level toc and I could give every level a different color.

               

              There are two notes:

              - You can't repeat .child .child indefinitely. I thougt you could use four elements or so max. CSS becomes invalid and the styling breaks. Don't know why though...

              - When you use .child A, this not only colours all second level links, but also third level links, etc. Those link also meet the condition: a link in an element with the classname 'child'. If you need to go many levels (more than four), this method may not work for you.

               

              Greet,

               

              Willam

               

              This e-mail is personal. For our full disclaimer, please visit www.centric.eu/disclaimer.