Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

Reduce search excerpt size
Last Post 04/23/2012 12:37 PM by Mike Cundall. 2 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Mike Cundall
New Member
New Member
Posts:9


--
04/17/2012 10:55 AM
I really like having the document results on the same page as general site results but find that the excerpt length for each document is rather long.

Is there an easy way to reduce the size of the document excerpt size when the module is in search mode? I can see how to remove it altogether in the Search.aspx control but not how the length can be set?

Thanks in advance.
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
04/19/2012 5:49 PM
You could do it straight in the ascx. This is the original bit:

Text='|%# Server.HtmlDecode(Server.HtmlDecode(DataBinder.Eval(Container.DataItem, "Extract"))) + "|br|" %|'
(brackets replaced)

And change it to something like this:
Text='|%# Left(Server.HtmlDecode(Server.HtmlDecode(DataBinder.Eval(Container.DataItem, "Extract"))), 100) + "|br|" %|'

i.e. adding Left( .., 100) around the result.

Peter

Mike Cundall
New Member
New Member
Posts:9


--
04/23/2012 12:37 PM
Hi Peter,

Thanks for that. That's worked great.

Mike.
You are not authorized to post a reply.