According to [saram.net] Information Center:
> I'm trying to customize the HTML on the search result page and in need for
> some help locating a sample HTML.
> I've browsed the htdig website and found a tip and I've included the
> following lines in the new config file.
> ------------------------------------------------------------------
> search_results_header: ${common_dir}/new_header.html
> search_results_footer: ${common_dir}/new_footer.html
> template_map:  Long long builtin-long \
>                Short short builtin-short \
>                Default default ${common_dir}/new_result.html
> template_name: Default
> ------------------------------------------------------------------

A couple problems:  first of all, the example for template_map in the
documentation is wrong.  htsearch selects the builtin templates based on
the internal name, not the file name, so to use a builtin-* template,
the second name in the triplet must be builtin-long or builtin-short,
and the third name is ignored.  The documentation erroneously says
that it uses the file name.  I don't know whether we should fix the
documentation or the code.  Anyone have a recommendation?

Secondly, the template_name also selects the template by its internal
name, and not by its display name (first in triplet).  In your case,
it's the same name, because it does a case-insensitive comparison, but
if you had different names for display and internal, it wouldn't find it.

So, you should have:

search_results_header: ${common_dir}/new_header.html
search_results_footer: ${common_dir}/new_footer.html
template_map:  Long builtin-long builtin-long \
               Short builtin-short builtin-short \
               Default default ${common_dir}/new_result.html
template_name: default

> Everything works fine exept that I didn't have anything to reference for
> the result.html so I had to comment out the 5th line to use the default
> result form  which I wouldn't know where to look into.
> In other words, the htdig install only generated header.html and
> footer.html files in the ${common_dir} and no result.html file.
> Could someone post a sample HTML for the result.html file? or tell me where
> I could find it?

Up to and including 3.1.1, you have to look at htsearch/TemplateList.cc to
get the builtin templates.  In future releases, samples will be installed
in common_dir.  Here they are:

long.html:
----------
<dl><dt><strong><a href="$(URL)">$(TITLE)</a></strong>$(STARSLEFT)
</dt><dd>$(EXCERPT)<br>
<i><a href="$(URL)">$(URL)</a></i>
<font size=-1>$(MODIFIED), $(SIZE) bytes</font>
</dd></dl>

short.html:
-----------
$(STARSRIGHT) <strong><a href="$(URL)">$(TITLE)</a></strong><br>

-- 
Gilles R. Detillieux              E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930
------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the SUBJECT of the message.

Reply via email to