Page 1 of 1

Feature request quicksearch plugin

Posted: Wed Mar 15, 2006 3:29 am
by carl_galloway
Hi guys, I've been looking at the trackbacks in the admin suite and notice that they are a truncated version of the entry with a few words before or after the link. Is it possible to do the same thing with search results so that the results display x many words before and after the first instance of the search term? Is it also possible to do this with Smarty in the template?

I think this would be a very nice touch for our themes.

Carl

Re: Feature request quicksearch plugin

Posted: Wed Mar 15, 2006 12:32 pm
by garvinhicking
Hi Carl!

You could be able to do that with 'truncate' in your smarty template:

Code: Select all

{if $searchresult_results}
{$entry.body|truncate:200}
{else}
{$entry.body|truncate:200}
[/if}
However, I personally always liked the way that I see the complete results of my search, and not just excerpts. Because I usually use a very general searchterm when searching a blog and then narrow it down with my browser search functions....

HTH,
garvin