Portal Engine
Version 3.x > Portal Engine > Search result with small extract View modes: 
User avatar
Member
Member
Chunda - 1/22/2009 3:26:30 PM
   
Search result with small extract
Is it possible to get a small extract of the document in the Search Results, if so what is the code to add to the transformation?

I' using the following so far:

<div class="SearchResult">
<div class="ResultTitle">
<a href="<%# GetDocumentUrl()%>"><%# Eval("SearchResultName") %></a>
</div>
<div class="ResultPath">
<%# Eval("DocumentNamePath") %><br />
</div>
</div>

Thanks
Chunda

User avatar
Member
Member
Elijah - 1/24/2009 9:02:57 AM
   
RE:Search result with small extract
If you use the meta description property on documents, then you could access that property.

<%# Eval("DocumentPageDescription") %>

This would be good practice anyway, since that is what Google prefers to display for search results as well (the Meta Description tag).

Just one option :-)


User avatar
Kentico Support
Kentico Support
kentico_jurajo - 1/26/2009 6:37:05 AM
   
RE:Search result with small extract
Hi,

Above is very nice option how to do it. Another option is to add to the document types new field for summary and then display the content of this field in the search results transformation.


Best Regards,
Juraj Ondrus

User avatar
Member
Member
Chunda - 1/26/2009 11:36:23 AM
   
RE:Search result with small extract
Thanks,

I was converting an ASP site which used the Microsoft Index services, and that provided a text extract around the search term where it is found, so I was wondering if a similar feature was available.

I think I'd use the Meta data as a place for a page summary.

Cheers
Chunda