use PageModule in ISearchable

This commit is contained in:
sbwalker
2024-07-02 14:50:26 -04:00
parent 45b1d405a6
commit 8969b1273f
3 changed files with 11 additions and 12 deletions

View File

@ -48,18 +48,18 @@ namespace Oqtane.Modules.HtmlText.Manager
return content;
}
public List<SearchContent> GetSearchContents(Module module, DateTime startDate)
public List<SearchContent> GetSearchContents(PageModule pageModule, DateTime startDate)
{
var searchContentList = new List<SearchContent>();
var htmltexts = _htmlText.GetHtmlTexts(module.ModuleId);
var htmltexts = _htmlText.GetHtmlTexts(pageModule.ModuleId);
if (htmltexts != null && htmltexts.Any(i => i.CreatedOn >= startDate))
{
var htmltext = htmltexts.OrderByDescending(item => item.CreatedOn).First();
searchContentList.Add(new SearchContent
{
Title = module.Title,
Title = pageModule.Module.Title,
Description = string.Empty,
Body = htmltext.Content,
ContentModifiedBy = htmltext.ModifiedBy,