custom search results sample issue
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
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;