custom search results sample issue

Posted by Community Admin on 04-Aug-2018 17:47

custom search results sample issue

All Replies

Posted by Community Admin on 14-Apr-2015 00:00

Hi,

 I am modifying the custom search results sample found here: www.sitefinity.com/.../customizing-sitefinity-searchresults---displaying-product-thumbnails

I am unable to compile it for a few reasons, both of which I suspect might be related. One is the following error message related to this using statement (using Telerik.Sitefinity.Services.Search.Model;):

Error 2 The type or namespace name 'Model' does not exist in the namespace 'Telerik.Sitefinity.Services.Search' (are you missing an assembly reference?) C:\Projects\Work\SiteFinityUpgradeTest73b\SiteFinityUpgradeTest73b\FGLife.Public.Web\CustomControl\fglSearchResultsEmployeeDirectory.ascx.cs 10 42 FGLife.Public.Web

 The other issue is presented by the following line

this.resultsList.ItemDataBound += ResultsListItemDataBound;

 

I cannot seem to find out what model the first error is referring to and what the correct namespace is, and for the second error the line refers to a this.resultsList and i have no idea what this represents or what I am supposed to have inherited from if anything. Maybe this is sillybut could someone point me in the right direction?

 Thanks

 

Posted by Community Admin on 17-Apr-2015 00:00

Hello,

You can find the full sample for this at the end of this blog post:
http://www.sitefinity.com/blogs/boyan-barnevs-blog/boyan-barnevs-posts/boyan-barnevs-blog-/2012/11/06/customizing-sitefinity-searchresults---displaying-product-thumbnails-and-other-content-type-specific-data

Once you have this on your end, you will be able to utilize the List Data Bound event from the ascx file. For the correct usings,  try the follwing:

using System;
using System.Linq;
using System.Web.UI.WebControls;
using Telerik.Sitefinity.Ecommerce.Catalog.Model;
using Telerik.Sitefinity.Libraries.Model;
using Telerik.Sitefinity.Modules.Ecommerce.Catalog;
using Telerik.Sitefinity.Modules.Libraries;
using Telerik.Sitefinity.Modules.Pages;
using Telerik.Sitefinity.Pages.Model;
using Telerik.Sitefinity.Services.Search.Data;
using Telerik.Sitefinity.Utilities.TypeConverters;


Regards,
Atanas Valchev
Telerik
 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed