<$BlogRSDURL$>

Rick Henkel - FrameMaker-Related Stuff

Comments and tips related to Adobe FrameMaker

Atom Feed

Tuesday, November 14, 2006
 
Modifying the search pane in WebWorks Help 5.0 ouput
Default Search pane in WebWorks Help 5.0

We use ePublisher Pro and FrameMaker 7.2 to produce WebWorks Help 5.0. The search functionality in this output is a bit quirky and not quite like what you might expect if you're used to doing Web searches. For example, putting quotes around search terms finds only that exact term in most Web searches. But that doesn't work in WWH 5.0. As a result, we get a lot of questions from confused customers as to why they can't find what they're looking for.

I've included some hints about searching in a help file that I created to show users the ins and outs of our guides. But I've found that most people don't bother reading the help file, so I wanted to find a way that they couldn't miss the information.

As you can see by the image on the right, the default Search pane in WWH 5.0 has a lot of white space. So I wanted to see whether I could utilize that white space for my purpose.

I found the JS file that contained the information for that pane, which is the search.js file in the install directory\ePublisher Pro\Formats\WebWorks Help 5.0\Files\wwhelp\wwhimpl\js\scripts folder. Following is the code that I needed to change (line 320 in my version of the search.js file):



HTML.fAppend("<h3>" + WWHFrame.WWHJavaScript.mMessages.mSearchDefaultMessage + "</h3>\n");

The code in the middle of that line, WWHFrame.WWHJavaScript.mMessages.mSearchDefaultMessage, was determining what appeared in the Search pane. So, after creating a project target override for this file, I changed the line to the following:

HTML.fAppend("<p><strong>Type the word(s) that you want to find in the above box using the following hints:</strong> </p><ul><li><p>Search results appear in order based on a results scoring system. Click the help file icon at the bottom of the page to view more information about the scoring system.</p></li><li><p>Some search results may appear in sections of collapsed text. To show all text, click <strong>Expand All</strong>.</p></li><li><p>The search functionality does not support the use of quotes around search terms or the use of Boolean search operators. If you type more than one word in the search box, the results include every page that contains all the words you typed, regardless of the order in which they appear.</p></li><li><p>You can search for word fragments using the * symbol. For example, if you search for <em>*serve</em>, the results would include all words that end in <em>serve</em> such as <em>observe</em>, <em>preserve</em>, or <em>conserve</em>. </ul>\n");


(Everything is on the same line of code to keep the JavaScript from breaking.)

When I re-generated my project, my Search pane looked like the following:

Customized Search pane in WebWorks Help 5.0


(1) comments

Powered by Blogger Get Firefox