Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Custom Content Provider Not Searchable

Vote:
 

Hi there,

Following the tutorial here https://world.episerver.com/blogs/Per-Magne-Skuseth/Dates/2014/11/content-providers-101--part-i-introduction-initialization-ui--identity-mapping/ we are trying to implement a custom ContentProvider. Posted this as a question on the tutorial page but thought to make a new post as well:

The issue is we can't get the ContentProviderResult using DataFactory.FindPagesWithCriteria.

Snippet

ContentRepository.GetChildren<>Attendee>(page.PageLink); -> works ('page' is the container ContentPage mentioned earlier)

Snippet
PropertyCriteriaCollection crits = new PropertyCriteriaCollection();
       PropertyCriteria crit = new PropertyCriteria();
       crit.Name = "EPI:MultipleSearch";
       crit.Value = "attendees";
DataFactory.Instance.FindPagesWithCriteria(page.PageLink, crits); -> won't work


Also tried crit.Value = "*"

In the initialization module did

Snippet
searchClient.Conventions.UnifiedSearchRegistry.Add(typeof(Attendee));

Any idea why using GetChildren of ContentRepository works but not FindPagesWithCriteria....?

Also.... a second question: the pages returned by the ContentProvider get displayed in the tree structure in CMS but when clicking show 'All Properties' it will load forever...
any idea why?

The reason why we are trying to implement the ContentProvider is because we have entities from an external Database that we want to route to an Episerver ContentPage and trying a partial router didn't work
because our entities don't inherit from IContent. That's why we're trying to implement the custom ContentProvider: to bring the entities from the external DB as Episerver pages which
we will route.

Any help wolud be appreciated, Thanks!!!!
#180473
Jul 12, 2017 11:55
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.