Out of the box the full-text search feature in WebHelp indexes everything in the page, including all the text in the header. When the user executes a search the header text gets displayed at the beginning of the "excerpt" for each topic displayed in the list of search results.
You can change this with two switches that turn indexing on and off in your HTML templates. These can be used to exclude the both the header itself and the header information from the index, which means that the excerpts will begin with the actual text of your topics. Here's how to do it:
Edit in the skin if you are using a skin
Everything in these templates must be edited in the .hmskin skin file if you are publishing with a skin. When you use a skin, the HTML templates and settings in the skin replace those in your project. Usually, when you are using a skin, you don't need to edit anything because it has all already been set up by the designer.
Procedure:
1.Go to .
2.Select the "HTML Source Code" tab.
3.Enter <!--ZOOMSTOP--> on a single line of its own directly before the beginning of the header code, (directly before the <IF_TOPIC_HEADER> switch), like this:
<!--ZOOMSTOP-->
<IF_TOPIC_HEADER>
4.Enter <!--ZOOMRESTART--> on a single line of its own directly before the <%TOPIC_TEXT%> variable, like this:
<!--ZOOMRESTART-->
<%TOPIC_TEXT%>
5.Repeat steps 1-4 for the other templates in the HTML Page Templates section if you have created any other custom templates.
That's it. When you recompile everything in the header will be excluded from the index and the excerpts. You can also exclude parts of individual topics from the search index. To do this just use the Insert - HTML Code function to insert the stop and start switches before and after the text you want to exclude.
|