This content has been marked as final. Show 16 replies
Thanks for the link, Colum. However, I can't find information on making topics unsearchable on that page. (It did, however, answer my other question). Do I have to make these "pop-up" topics baggage files? It doesn't appear to allow me to do this in the hyperlink dialog box for the image map.
I tried all of the steps listed on that link. It doesn't seem to be working properly. There are a couple of issues.
1) When I rename an HTM file as an XHTM file, it importants with the following naming convention: filename.XHTM.htm. Not sure if that gets around the RoboHelp engine.
ConnectionsAcademy, Colum -
1) add the text 'popup_' to the front of each file you wish to hide.
2) open whfhost.js and find the function displayTopics();
3) Replace the part of that function that looks like this, in the first snip, and replace it with the second, prettier script.
And another tweak.....no harm in having choices. I
This is how I hide topics from the webhelp search tab. It is a manual process, but we only run through the process/tweak before major builds. Its not as daunting as it first seems. I think that this may trick may have originated from the good RoboWizard but I don't have the time to find the source of this trickery right now (apologies if there is an element of plagiarism Rick).
How to exclude the pop up topic from the search:.
1. Generate the project.
2. Go to the webhelp/publishing folder. Copy the files (e.g. popup_xyz.htm etc). that you wish to exclude form the search to a nice safe location You'll need these files later.
3. Now set up a new conditional tag in your project (e.g. not_in_search).
4. Apply this conditional tag to the topics you wish to exclude form the search (e.g. popup_xyz.htm etc).
5. Delete the entire contents of the webhelp output folder.
6. Generate the project again (this time, make sure your build expression excludes the topics that you have marked with the conditional tag e.g not_in_search).
7. Once the generation process is complete. Copy the files that you put in nice save location (e.g. popup_xyz.htm etc to the webhelp output folder).
8. Run your help and the popups will not appear in the search.
Note: This tweak needs to be run every time you want the topics excluded, so you may just prefer to do it when you area about to ship a version of your help system.
It wouldn't take much to build that script into a process that returns the search topics in order of relevance, and knowing the path allows further customization to provide context, if need be. One could put in icons to depict the category.
...and, my small 'adjustment' in the script can be implemented with the click of a button with
Sure. You'll be altering a script found in a .js file that displays the topics in the Search pane. Basically, you're telling the displayTopics() function to skip files with your special 6-character prefix. You don't need to alter the way you call your popups, just change the filenames of the files to hide, and add the bit-o-script to the .js file at the Webhelp root.
1) add the text 'popup_' to the front of the filename of each file you wish to hide. Or, use your own term to denote hidden files.
2) In the generated WebHelp folder, open whfhost.js; find and edit the function displayTopics();
3) Replace the part of that function found in whfhost.js that looks like the first snip, and replace it with the second, prettier script.
Forgot to mention - there are two almost identical lines, one version for testing on your workstation, the second to actually use when posting on the server. Move the comment slashes from the second to the first version before you post it online.
var Search_xstart = Search_URL.lastIndexOf("\\") + 1 // TEST LOCALLY - start of filename -
// var Search_xstart = Search_URL.lastIndexOf("/") + 1 // USE WHEN ONLINE - start of filename -
Not sure what you're seeing there, but if you make your changes to the filenames in the RH explorer window, RH will keep track of the changes and adjust the corresponding hyperlinks. Ultimately, you have an option to generate the output filenames as all lower case, and, except for Unix servers, case in filenames doesn't really matter anyway.
One litte twist:
When you change the name of a file in RH, it doesn't recognize a change in case. So you should start by renaming it Pop_...... and save the project. Then change the file name to popup_..... and RH will save the lower case name.
Maddening, isn't it?
Hi Roger and Crag,
First of all, thanks very much for providing such useful and elegant tricks! I like a "simpler is easier" approach, especially when I have to pass a project off to the client for them to maintain.
Now onto my difficulties in getting either solution to work.
A primer: I have two files that I'd like to hide from search. One file is linked to via a toolbar button The other file is called as a popup from multiple documents. My output is WebHelp.
1. Renamed the two files using the prefix nsrch_
2. Generated the WebHelp
3. Opened whfhost.js and replaced the code as directed
4. Changed the prefix in the code to my own prefix (nsrch_)
5. Tested offline (didn't work)
6. Tested online (still didn't work)
I did comment out the appropriate line depending on where I was testing. Still no go. Any insight into the matter would be most appreciated!
Now onto the equally nifty Conditional Build trick. I tried it and it works beautifully! Unfortunately, there's one big caveat. When I generate the WebHelp, the links to the pop-up file from the topics themselves are not generated. So, while my file is nicely hidden from the search engine, it's also hidden from the topics themselves. Gah!
Any ideas? I'm starting to wear a thin patch on my head from all the head-scratching and hair pulling
Thanks in advance!
EDIT: I found a slightly different version of Crag's method here and, using the associated TechNote, I was able to get it to work! Yay!
However, I'm still immensely interested in getting Roger's method to work. Although the above method is easy once you know what you're doing, I'd rather a method with less steps like Roger's as it's my clients that have to ultimately do the work in the long run
Hi Hanna -
Its hard to say without seeing the script. Do you get an error message, or do the topics just show up? Do you have it posted somewhere we can look at it? If not, feel free to send it to my profile address, or firstname.lastname@example.org.
Hi Roger,1 person found this helpful
Thanks for the quick response and offer of help! My apologies for the vagueness of "no go." By that I meant, the topics were still showing up in the search results.
Not that it much matters now as I was finally able to get it to work . As I'm not able to provide a link to my project (non-disclosure agreement and all), I prepared an example test project to show the problem. Trouble was, the test project worked flawlessly. So, much re-generation, text-editing, and clearing of caches later, it works like a charm on my real project, too!
No idea what the heck I was doing yesterday that caused the grief. Maybe too-much/not-enough coffee in the afternoon. Heh
Anyways, thanks again, to you both. It's great to have both methods available for future projects. Hopefully Adobe will address this in a future release! (And yes, I've already submitted a feature request )