Any way AT ALL to exclude a topic from search?

This forum is for all Flare issues related to the Microsoft HTML Help target.
This target produces "CHM" files in the output.
Post Reply
cburnett
Jr. Propeller Head
Posts: 8
Joined: Wed Nov 29, 2017 9:09 am

Any way AT ALL to exclude a topic from search?

Post by cburnett »

I want to include a topic (.htm file) in a .chm build, but I don't want that topic appearing in search results.

MadCap's 'Including or Excluding Topics in Search' help page explicitly says "In Microsoft HTML Help, all topics are always searchable," and all my research and testing and attempts at subversion seems to prove that true. But I figured I'd try one last push before giving up.

Is there ANY sort of workaround I could try in order to include a topic in a .chm build but exclude it from searches? A line of code in the topic's Text Editor? Some way I could rename the file extension? An STP file? Anything?
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Any way AT ALL to exclude a topic from search?

Post by RamonS »

The help compiler is from Microsoft and I guess MadCap's hands are tied. The only idea I have is to put an image into the topic, including heading and everything. The search will not pick up on that. Goofy, but effective.
Psider
Propellus Maximus
Posts: 811
Joined: Wed Jul 06, 2011 1:32 am

Re: Any way AT ALL to exclude a topic from search?

Post by Psider »

There's a snippet on this page where they exclude the redirect topic from the search by naming it .xhtm instead of .htm.

http://kb.helpwaregroup.com/ms-html-help/merge/ctx2

From memory I couldn't get that to work, but I think .x.htm worked for me? Have a play and see it that helps?
cburnett
Jr. Propeller Head
Posts: 8
Joined: Wed Nov 29, 2017 9:09 am

Re: Any way AT ALL to exclude a topic from search?

Post by cburnett »

I tried renaming the extension. .xhtm seems to exclude the entire topic from the build, or at least it hides it from search a little TOO well (I'll explain below). .x.htm seems to just be read by the system as a regular .htm.

A tech support guy from Flare suggested that I try deleting the top line of code in the topic (<?xml version="1.0" encoding="UTF-8"?>), but whenever I try to delete it and then leave/come back to the Text Editor, Flare has un-deleted it. Is this working as intended or a bug?

Quick explanation about my company's setup to explain why I want this feature: My company’s help system includes one big Master TOC project that links to individual .chm files/topics, each of which is also published individually and links back to the Master TOC .chm file as its TOC. Our system is set up this way because long ago our programmers set up our software to call for specific .chm help files depending on which screen F1 is pressed from. This worked fine navigation-wise, but this meant that if the Search tab was used from an individual .chm (as accessed with F1), then the search results mainly included only results found in that particular .chm (rather than the database of all .chms linked in the Master TOC, which we’d prefer). Our original ugly-but-functional workaround was hiding the Search tab in the skin and directing customers to a Jump button that accessed the Master TOC file that they could search instead.

However, in the process of converting our help documentation from our previous authoring tool (H&M) to Flare, I noticed that searches run in a Flare-built .chm also randomly include results from any external .chm file linked in the text of that .chm file. My hope was that I could create an .htm file with text links to all other screens in our database, find a way to make that .htm invisible in search results, and then copy-paste that .htm into the Content folder for every Flare Project we have. That way, in theory, the Search tab could be used to access our entire .chm database and we wouldn’t have to rely on the clunky Jump button method. I mean, this method would still be clunky, but it would only be clunky behind the scenes. Fine by me. I get paid by the hour.

So you see that my request is a little tricky. I want to create an .htm that is included in the build and whose content is read by searches, but which doesn’t actually itself appear in the search. I understand if this is impossible but I figured it was worth a shot before going back to the Jump button method.
Psider
Propellus Maximus
Posts: 811
Joined: Wed Jul 06, 2011 1:32 am

Re: Any way AT ALL to exclude a topic from search?

Post by Psider »

Have a look at the "How to merge" topics on the site I linked to. You should be able to search across all chm files. You might need to set up the child chms as described in that topic. However, it's possible that Flare will be "helpful" and re-write the merge section (removing the setup or hard-coding the links) so you might need to perform a manual task to fix, as the last task before compiling a chm (or maybe compile, manual fix, re-compile). (I'm working from memory here - it's been a long time since I worked with chm files.) This might be too much work for what you need. Other than that, your developers might need to look at one of the other methods described in those topics, and change the method of calling help to pass everything through the master in the first instance.

Edit: or, my brain is telling me there might be a setting in flare to tell it that search/toc etc should work from the children?
ccfisher76
Propeller Head
Posts: 12
Joined: Thu Aug 31, 2017 7:43 am

Re: Any way AT ALL to exclude a topic from search?

Post by ccfisher76 »

We are really confident that the programmers are tying the wrong method to the F1 key. They're using a Keyword method instead of an A-keyword method. However, they will not change. They say it's too much work at this point.

I am very intrigued by your idea of making the Master target search in child targets. Is there any documentation in Flare that describes that process?

Thanks!
Psider
Propellus Maximus
Posts: 811
Joined: Wed Jul 06, 2011 1:32 am

Re: Any way AT ALL to exclude a topic from search?

Post by Psider »

I had a bit of a search in the help files and found this:
http://help.madcapsoftware.com/flare201 ... L-Help.htm

Otherwise, the only writeup I know is the website I pointed you to before.

Sorry I can't be more help.
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Any way AT ALL to exclude a topic from search?

Post by RamonS »

ccfisher76 wrote:We are really confident that the programmers are tying the wrong method to the F1 key. They're using a Keyword method instead of an A-keyword method. However, they will not change. They say it's too much work at this point.

I am very intrigued by your idea of making the Master target search in child targets. Is there any documentation in Flare that describes that process?

Thanks!
Not that it helps you, but if changing the help calls is "too much work" then whoever put those in place didn't do it right. There ought to be a global method/function that accepts a handful of parameters, such as the map ID or alias. The call is made from one central piece of code that if changed impacts behavior across the board. If the issues with help are due to the incorrect call then devs need to spend their nights and weekends and refactor the code. I know they don't want to have any of it, but it shows that it sucks when things are not done properly the first time.
Richard Ferrell
Propellus Maximus
Posts: 840
Joined: Mon May 01, 2006 10:11 am
Location: Inside California

Re: Any way AT ALL to exclude a topic from search?

Post by Richard Ferrell »

The CHM search function is just a simple text search and it will find everything It can’t be edited since the viewer is a Microsoft product
Richard Ferrell

Certified Madcap Trainer
Image
Post Reply