Hi,
With the help of Google and this forum finally I find out how to implement ISearchable interface in my module to provide searching facility.
To do this I have added following code to “FeatureController.cs” which is provided in “Christoc's Module Template”:
public DotNetNuke.Services.Search.SearchItemInfoCollection GetSearchItems(DotNetNuke.Entities.Modules.ModuleInfo ModInfo)
{
SearchItemInfoCollection SearchItemCollection = new SearchItemInfoCollection();
List<
ClassTabs
> colPriceTabs = TabController.GetAll(ModInfo.ModuleID);
foreach (ClassTabs objPriceTab in colPriceTabs)
{
SearchItemInfo SearchItem = new SearchItemInfo(ModInfo.ModuleTitle, objPriceTab.Content, objPriceTab.CreatedByUserID, objPriceTab.CreatedOnDate, ModInfo.ModuleID, objPriceTab.ContentItemId.ToString(), objPriceTab.Content, "ItemId=" + objPriceTab.ContentItemId);
SearchItemCollection.Add(SearchItem);
}
return SearchItemCollection;
}
Now the problem is that, when I check the module definition the “is searchanble” is false and looking at “DesktopModules” table in database, under the “SupportedFeatures” column the value is “0” I have update the module, reinstalled the module and the value stay same.
I have changed the value manually and manage to get “is searchanble” true, but still i cant search the module, i have placed a break point on the above code an I have noticed that it is not hit at all.
Should I add any extra code somewhere else?
Please I am nearly finishing my project but struggling in this bit, really do appreciate any help or suggestion.
Thanks,