How to use AsyncPartialContentComponent?

Vote:
 

The Foundation project contains MediaController which implements the AsyncPartialContentComponent.

My question is: How to use that controller for rendering data? For example, how to tell renderer to use ImageMediaData from MediaController?

I have not found any example in the Foundation project. ImageMediaData does not seem to use MediaController logic for rendering.

I also tried to register that controller in the IViewTemplateModelRegistrator, but I'm not sure how since registrator requires path for a view while MediaController specifies it in the logic.

Link to code: https://github.com/episerver/Foundation/blob/6da2cf768f517062c6a25158d72eed53fb0f60a9/src/Foundation/Features/Media/MediaController.cs

#283622
Edited, Jul 13, 2022 12:44
Vote:
 

The MediaController will be invoked when you drop something inheriting from MediaData into e.g. a ContentArea. Unless there is a more specific AsyncPartialContentComponent available for the content type.

#283636
Edited, Jul 13, 2022 16:02
Vote:
 

And ContentArea is the answer, thank you a lot, Johan!

#283679
Edited, Jul 14, 2022 7:59
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.