London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
Hello,
We have implemented a custom content provider with load, search and listing parameters. We mainly use it with a custom widget to get images and videos from an external API into a page. So far so good.
My question is - how can I use the content provider from a custom Page? Let's say I'd want to do something like searching the content provider for a certain query and always displaying the latest result, or hard-core an external content ID to display on a page.
Would I use the content provider directly in a page's controller, and/or do some config and registration to make that sort of thing work?
The content provider has the following interface:
public class MyCustomProvider : EPiServer.Core.ContentProvider { public static string Key = "custom_provider"; //... // ICustomMedia implements IContent public IEnumerable<ICustomMedia> Search(string query) { //... } protected override IContent LoadContent(ContentReference contentLink, ILanguageSelector languageSelector) { //... } protected override IList<GetChildrenReferenceResult> LoadChildrenReferencesAndTypes( ContentReference contentLink, string languageID, out bool languageSpecific) { //... } // .. }