Re: htdig: Templates.


steve (sjd@mindspring.com)
Wed, 03 Dec 1997 15:05:22 -0500


At 06:15 PM 12/3/97 +0100, you wrote:
>Hi everyone,
>
>I was wondering if anyone succesfully has implemented templates on their
>search engine, I am trying to,but I can't seem to find the right way to do
>it, if anyone has a .html file template, I'd appreciate them sending it to
me!
>
>Thanks In Advance,
> Yours,
> David Hjortso.
>----------------------------------------------------------------------
>To unsubscribe from the htdig mailing list, send a message to
>htdig-request@sdsu.edu containing the single word "unsubscribe" in
>the body of the message.
>

>From the file: htsearch/TemplateList.cc you can extract the builtin-long
template:

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

Save this as "long-test.html" into your common directory, then put the line
in your htdig.conf file:

template_map: Test test /full/path/to/file/long-test.html

Now add the option to select "Test" within the standard search.html:
Right after: <option value=builtin-short>Short
Add: <option value=test>Test

This should give you exactly the same results as the builtin template, but
with the line "IT WORKS!!!" between the excerpt and the URL (that part is
NOT in the source code :-) ). I found that I HAD to have the full-path
listed in the config file, or it would bomb. YMMV.

Hope it helps

Steve
sjd@mindspring.com
----------------------------------------------------------------------
To unsubscribe from the htdig mailing list, send a message to
htdig-request@sdsu.edu containing the single word "unsubscribe" in
the body of the message.



This archive was generated by hypermail 2.0b3 on Sat Jan 02 1999 - 16:25:24 PST