11 Replies Latest reply on Nov 9, 2009 4:28 AM by adrianaharper

    RH8 - change number of search results

    Robokate

      Hi everyone,

       

      We're looking into upgrading from RH5 to RH8 and I notice that the Search returns only 10 results per page by default. Does anyone know if there a way to change this default or remove it? I know our users will be pretty peeved at the paltry 10 per page because we have thousands of functions to search and they won't like having to change the 10 to 99 when previously they were given all the results in one long list.

       

      Thanks

       

      Kate

        • 1. Re: RH8 - change number of search results
          Robokate Level 1

          I've managed to do this by editing the following line in the whform.js file in the Webhelp output folder:

          var gnMaxRslt = 10;

           

          It's a bit of a pain to do this every time I compile, so if anyone knows how to achieve the same result without reverse engineering I'd love to hear from you.

           

          Also I edited whfhost.js so that the Rank column in the search results doesn't take up 50% of the space and it looks a lot better.

           

          Cheers

           

          Kate

          • 3. Re: RH8 - change number of search results
            Robokate Level 1

            Good idea Rick, consider it done

            • 4. Re: RH8 - change number of search results
              Peter Grainge Adobe Community Professional (Moderator)

              Better still, have an option to display the results in the topic pane where there is rather more space.

               


              See www.grainge.org for RoboHelp and Authoring tips

              • 5. Re: RH8 - change number of search results
                Kutra

                Hi Peter:

                 

                Until Adobe adds it as an OOTB feature, do you know of a way to customize RH8 so that the search results are displayed in the topic pane? Or maybe, display even the search text field in the topic pane/

                 

                Thanks,

                K

                • 6. Re: RH8 - change number of search results
                  Peter Grainge Adobe Community Professional (Moderator)

                  Sorry but no I don't.

                   


                  See www.grainge.org for RoboHelp and Authoring tips

                  • 7. Re: RH8 - change number of search results
                    karimc

                    Hi Kate,

                     

                    I was able to use the first part of your suggestion to modify the title of the Rank column - thank you! Where in the whfhost.js file do you change the default column width?

                     

                    Also, do you know of a way to make the left pane wider by default? It was fine as it was in RH7, but with the Rank column, it would be nice if it were a little wider.

                     

                    Kari

                    • 8. Re: RH8 - change number of search results
                      Robokate Level 1

                      Hi Kari,

                       

                      I discovered that you can edit the whfhost.js and whform.js files in C:\Program Files\Adobe\Adobe RoboHelp 8\RoboHTML\WebHelp5Ext\template_stock  to make the changes without reverse engineering the output (make sure you back up the originals first!).

                       

                      To make the left pane wider and the rank column narrower, I edited whfhost.js on lines 3151-3159 as follows:

                       

                      return "<TABLE CELLSPACING=0 CEllPADDING=0 STYLE='table-layout:fixed; width:105%'>" +
                          "<THEAD>" +
                           "<TR STYLE='font-weight:bold'>" +
                            "<TD ID='OdinFtsTitle' CLASS='fr_tt' STYLE='cursor:pointer; width:75%'>"+gsTitle+"</TD>" +
                            "<TD ID='DragSep'  CLASS='fr_ts' STYLE='cursor:w-resize; width:4px'> </TD>" +
                            "<TD ID='OdinFtsRank' CLASS='fr_tt' STYLE='cursor:pointer; width:25%'>"+gsRank+"^</TD>" +
                           "</TR>" +
                          "</THEAD>" +
                          "<TBODY ID='OdinFtsRslt'>";

                       

                      You may want to tinker with the widths, but 75%/25% works ok for me.

                       

                      Regards

                       

                      Kate

                       

                      Message was edited by: Peter Grainge hoping Kate doesn't mind me emphasising the change.

                      • 9. Re: RH8 - change number of search results
                        adrianaharper Level 1

                        I am looking for this within my whfhost.js file and I don't see it...

                         

                        The closest I could find were these two sections:

                         

                        function writeTableHead()
                        {
                            if(gbAIRSSL)
                                return    "<TABLE CELLSPACING=0 CEllPADDING=0 STYLE='table-layout:fixed; width:100%'>" +
                                        "<THEAD>" +
                                            "<TR STYLE='font-weight:bold'>" +
                                                "<TD ID='OdinFtsTitle'    CLASS='fr_tt' STYLE='cursor:pointer'>"+gsTitle+"</TD>" +
                                                "<TD ID='DragSep'        CLASS='fr_ts' STYLE='cursor:w-resize; width:4px'> </TD>" +
                                                "<TD ID='OdinFtsRank'    CLASS='fr_tt' STYLE='cursor:pointer; width:60px'>"+gsRank+"^</TD>" +
                                            "</TR>" +
                                        "</THEAD>" +
                                        "<TBODY ID='OdinFtsRslt'>";

                         

                            return    "<TABLE CELLSPACING=0 CEllPADDING=0 STYLE='table-layout:fixed; width:110%'>" +
                                        "<THEAD>" +
                                            "<TR STYLE='font-weight:bold'>" +
                                                "<TD ID='OdinFtsTitle'    CLASS='fr_tt' STYLE='cursor:pointer'>"+gsTitle+"</TD>" +
                                                "<TD ID='DragSep'        CLASS='fr_ts' STYLE='cursor:w-resize; width:4px'> </TD>" +
                                                "<TD ID='OdinFtsRank'    CLASS='fr_tt' STYLE='cursor:pointer'>"+gsRank+"^</TD>" +
                                            "</TR>" +
                                        "</THEAD>" +
                                        "<TBODY ID='OdinFtsRslt'>";
                        }

                         

                         

                        Is it one of these that I edit to make the rank column narrower or ideally, disappear (width = 0%)??

                         

                        And when I think (thought?) I found this I edited the file and saved and it said it could not save it... "make sure that the path and filename are correct"... why can I not save it?

                         

                        TCS2 on xp machine

                         

                        Thanks,

                        -A

                        • 10. Re: RH8 - change number of search results
                          Robokate Level 1

                          Yes, that's the section. If you copy the widths from my post, you should see the results in your output. I have no idea why you can't save without seeing the set up on your machine. Is the file read-only?

                           

                          Make sure you keep a copy of the original file!

                          • 11. Re: RH8 - change number of search results
                            adrianaharper Level 1

                            Thank you so much RoboKate! I did save a copy and then I also saved this file to desktop and then pasted it into the directory to replace the old one (the only way I was able to edit). And generated - works like a charm!

                             

                            Much appreciated.

                             

                            -A