在 DNN 模块中ISearchable
,是否可以返回带有搜索结果的图像?
该类SearchItemInfo
有一个int Image
参数,但似乎没有在任何地方描述如何使用它。
public SearchItemInfoCollection GetSearchItems(ModuleInfo ModInfo)
{
var SearchItemCollection = new SearchItemInfoCollection();
using (IDataContext ctx = DataContext.Instance())
{
var controller = new ProductSetController();
foreach (var product in controller.GetProductSets())
{
var SearchItem =
new SearchItemInfo(product.Name, product.Summary, 0,
DateTime.Now, ModInfo.ModuleID, product.Code,
product.Description, "pid=" + product.Id.ToString(), 0);
SearchItemCollection.Add(SearchItem);
}
}
return SearchItemCollection;
}