Documentation Center

Change to Page model creation

If you extended the BaseController class, it might break due to a change in the way in which SDL Digital Experience Accelerator creates Page models.

Before DXA 1.1, it was the Page controller that created the Page model and populated the Regions with Component Presentations. It would then use the ProcessModel method to map those Component Presentations to the view models during the processing of the Entity controller.

DXA 1.1 and later, however, create the entire mapped model up front before firing the Region or Entity controllers.

This means that the ProcessModel method no longer maps Component Presentations to Entity models. As a result, the BaseController.Entity action now has an EntityModel parameter rather than an object parameter. This could cause classes that extend this controller to break.

Page model

You can still use the ProcessModel method for putting additional data in the model, but SDL recommends moving this logic into the public EnrichModel method, which can be called externally to get the enriched model from outside an action context.