November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
We implement IContentApiModelFilter in a more simple fasion, allowing us to perform better SOC in the end, see https://docs.developers.optimizely.com/content-management-system/v1.5.0-content-delivery-api/docs/how-to-customize-data-returned-to-clients
This will in it's most simple form look something like this
public class PageBaseFilter : IContentApiModelFilter
{
public void Filter(ContentApiModel contentApiModel, ConverterContext converterContext)
{
if (contentApiModel.ContentLink != null)
{
contentApiModel.Properties.Add("Id", contentApiModel.ContentLink.GuidValue.ToString());
}
// more more more
}
}
Hi all,
Currently I am looking into customizing the response of the content delivery api by adding new properties.
For now I was able to achieve something of that sort by overriding the ContentConvertingService class.
I would like to know if there is a better approach to add custom properties to the content delivery api.