5 Replies Latest reply on Jul 28, 2009 4:59 AM by MergeThis

    Multiple Topic Page Icons in RH7 TOC ??




      Was wondering if it is possible to use multiple icons for topic pages in  RH7 (Webhelp output) Table of Contents.

      I know how to change the icon for books and topics/pages, but that change is uniform to all topics and pages. Is there a way to assign a different icon to multiple pages and another to other pages, etc.


      Thanks in advance.


      Mike P

        • 1. Re: Multiple Topic Page Icons in RH7 TOC ??
          Captiv8r Adobe Community Professional & MVP

          Hi there


          There is a way but it's so painful as to make it very unworthwhile.


          This is something many have desired and expressed interest in. Please consider asking Adobe for it. You do this using the Wish Form.


          Cheers... Rick



          Helpful and Handy Links

          • 2. Re: Multiple Topic Page Icons in RH7 TOC ??
            mikepiet2 Level 1

            Hi Rick,


            Thank you for the very quick comeback on this. I will indeed mention it in the wish section.

            Just for curiosityies sake, you wouldn't have a link or description of the "very painful" process would you?


            Again, thanks for getting back.


            Mike P

            • 3. Re: Multiple Topic Page Icons in RH7 TOC ??
              Captiv8r Adobe Community Professional & MVP

              Hi Mike


              I'd have to do some deep digging on an old computer in order to unearth the information. If memory serves, the process was to locate a specific JavaScript file. Then locate a specific function. You duplicated the function and gave it a different name. Then you modified it to use the image of your choosing. Then you had to somehow reference the correct TOC element to point specifically to that function.


              I recall trying what was outlined with no success, so obviously I had overlooked a step or it wasn't properly conveyed to me to begin with. Ultimately I simply abandoned adding it to my Skinny on Skins file as I figured if I was unable to make it work I felt others probably would be as well.


              The steps were provided to me by another forum member a few years ago. Who knows, maybe they are reading this post right now. So perhaps they will offer to send you the steps.


              Cheers... Rick



              Helpful and Handy Links

              • 4. Re: Multiple Topic Page Icons in RH7 TOC ??
                mikepiet2 Level 1

                Hi Rick,


                Thanks much for getting back to me.

                You are right - definately too painful to attempt. :-)


                Much appreciate you taking the time.



                • 5. Re: Multiple Topic Page Icons in RH7 TOC ??
                  MergeThis Level 4

                  Actually, Rick, you do have it in your Skinny on Skins tutorial, in the Inserting additional images following specific links in the TOC topic under Navigation Pane > Table of Contents (TOC). It requires inserting code into the output whthost.js file and using that edited file (saved and stored elsewhere) to overwrite the one generated by RH every time you generate the project.


                  I use it for several pages, but the trick to making this work (as it is for any Javascript code) is to ensure that no line breaks get introduced in the transfer of code from your sample into the whthost.js file. When you save the file, human-readable line breaks and indents will be added, but those will not affect the performance of the function; they are only an issue if they are in the code when you initially paste it in). This works for me:


                  1. Save All the code from the sample provided.
                  2. Paste it into Notepad.
                  3. Uncheck the Format > Word Wrap option.
                  4. Delete all line breaks until you're left with a single line.
                  5. Save All and Paste into the correct place in the whthost.js file.
                  6. Edit the image name and tooltip to suit your needs.
                  7. Add the image to Baggage Files.


                  The bold text below is an example of one page (I actually have five of them), as it appears in my project (the code before and after it are the default lines generated each time by RH). Note that the title for the "if" Name must match the TOC entry exactly, and is case-specific. Note also my use of \n to generate a new line in the tooltip (to compress it into a more readable block instead of a long, single line).


                  Sigh...if only someone could come up with the code to do this for books, too. Now that would be cool!



                    sHTML+="target=\""+sTarget+"\" ";
                  if (getItemName(nIdx) == "Release Notes")
                  sHTML+="href=\""+_textToHtml_nonbsp(getItemURL(nIdx))+"\" title=\"Version 9 new features,\nenhancements, and known \nissues, in PDF format\"><img alt=\""+sAltString+"\" src='pdf_page.gif' border=0 align=\"absmiddle\"> "+sName+"</a></nobr></p>";

                  sHTML+="href=\""+_textToHtml_nonbsp(getItemURL(nIdx))+"\" title=\""+sName+"\"><img alt=\""+sAltString+"\" src=\""+sIcon+"\" border=0 align=\"absmiddle\"> "+sName+"</a></nobr></p>";
                  return sHTML;


                  Good luck,