According to [saram.net] Information Center:
> At 05:18 PM 4/1/99 -0600, you wrote:
> >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>
> >
> >-- 
> 
> Which directory am I supposed to put long.html and short.html files?
> I've placed the files in ${common_dir} but it didn't make any difference;
> of course, I did make some noticeable changes to the default code you gave
> me so I know if it does anything.

They can go wherever you want them to be, but they won't do anything
unless you reference them in your template_map definition.  By default,
htsearch uses the builtin definitions, which are, well, builtin!
I.e. they're embedded in the C++ code.  The long.html and short.html
files are just external samples of the internal strings used for the
builtin definitions.  You asked for a sample of HTML to put into your
new_result.html file, and so I obliged.

> Also, I'm a bit confused about the difference between the result.html and
> long.html+short.html files; do you mean I don't need result.html file when
> there are long.html+short.html files?

You can call your own template files whatever you like.  The long.html
and short.html files are merely samples that you can use, and contain the
equivalent of the builtin templates.  You can use long.html and short.html
files as your own templates if you want, but if you modify them, just
remember that a) they will no longer represent the builtin strings, and b)
when you install newer releases of ht://Dig, your modified long.html &
short.html files may be overwritten if you do a full "make install".
I would recommend using different names for custom templates.

> I did try to create a test 'new_result.html' file (simply put in <h1> tag
> in the file) to see if it does anything but it did not; It seems that
> '${common_dir}/new_result.html' does not even get looked at by the program
> routine despite that the file path is specified in the config file.

I don't know why.  I'd need to look at your current template_map and
template_name settings before I could hazard a guess.  If you set them
as I suggested above, and the input parameter "format", if specified,
is also set to "default", then it should use your new_result.html file as
the result template.  The "format" input parameter overrides template_name
in your htdig.conf file.

-- 
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