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

Try our conversational search powered by Generative AI!

Extend model and add custom property

Vote:
 

I would like to extend my model for Content Delivery API and add a custom property to render.

How can I do that?

I've seen a few blog posts:

...But it seems both IPropertyModelHandler and IContentModelMapper are no longer available.

Versions:

EPiServer.ContentDeliveryApi: 3.7.0
EPiServer.CMS: 12.17.1
Thank you
#302172
Edited, May 22, 2023 12:31
Vote:
 

See the breaking changes for the ContentDelivery Api. You can find what to use instead there

#302175
May 22, 2023 14:09
Vote:
 

So I have achieved an extension of the model by implementing the ContentApiModelFilter by adding the property and its value to the contentApiModel.Properties.

Thank you, Jeroen for the link.

#302271
May 24, 2023 8:30
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.