November Happy Hour will be moved to Thursday December 5th.

Improve CD Core

Fixed in

EPiServer.ContentDeliveryApi 2.4.0

(Or a related package)

Created

Nov 12, 2018

Updated

Jun 22, 2022

State

Closed, Fixed and tested


Description

Improve CD Core in terms of API and structure to better support different scenarios.

  • Add a simple way to extend *DefaultContentModelMapper *if you want to add and/or change a value in the model.
  • Expose ContentModelMapperBase that inherits IContentModelMapper in a public namespace with additional methods or properties:
  • Order *and *CanHandle: this pattern is about the same as converter, which allows you to select which
    mapper should be chosen based on a given content and order.
  • As a result, we use a factory to decide which mapper to used to handle content in the controllers.
  • Create a new class, ContentLanguageModel, that inherits LanguageModel. This class has the property “Link,” which lets users access content in a language by clicking the link. This class handles languages in CD instead of in LanguageModel like before.
  • Expose IExcludeFromModelTypeRegistration. This allows a model type to not be registered by the default converters.