From grdetil@scrc.umanitoba.ca Wed May 2 11:18:57 2001 Date: Wed, 2 May 2001 11:55:06 -0500 (CDT) From: Gilles Detillieux To: Peter Peltonen Cc: htdig Subject: Re: [htdig] search results page apperance According to Peter Peltonen: > HTML document's title is shown as the title of the document on the search > page. > > Can I change this somehow to the meta description? Yes. First, if you're running 3.1.5 or earlier, apply this patch, which adds a METADESCRIPTION template variable to htsearch. (patch -p0 < this-message-file) --- htsearch/Display.cc.orig Thu Feb 17 10:43:28 2000 +++ htsearch/Display.cc Fri Jan 12 11:12:13 2001 @@ -273,6 +273,7 @@ Display::displayMatch(ResultMatch *match vars.Remove("ANCHOR"); } + vars.Add("METADESCRIPTION", new String(ref->DocMetaDsc())); vars.Add("SCORE", new String(form("%d", match->getScore()))); vars.Add("CURRENT", new String(form("%d", current))); char *title = ref->DocTitle(); 3.2.0b3 and later snapshots already have this new template variable. Then, modify your result templates to use the METADESCRIPTION template variable in place of TITLE. You can simply uncomment the template_map definition from your htdig.conf file, and edit the common/long.html and common/short.html template files to use $&(METADESCRIPTION) instead of $&(TITLE). Also, you should not set use_meta_description to true, because you don't want the descriptions to appear as both the title and as the text in place of the excerpt. I suggested this technique to someone else in January, but the patch never made it into the patch archive. -- Gilles R. Detillieux E-mail: 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 _______________________________________________ htdig-general mailing list To unsubscribe, send a message to with a subject of unsubscribe FAQ: http://htdig.sourceforge.net/FAQ.html