The latest release 4.2.0.184 of Glass.Mapper.Sc is designed to make it easier for developers to customise and also contribute to the project.

Firstly you can download the items required to get the Glass.Mapper integration tests running from the Glass build server as an update package, one of the many great features of TDS. You can download these packages from the Artifacts of the Nightly Build:

We have also made multiple changes to the API to make it easier to override or change behaviours including:

  • Making individual methods as virtual in GetModel and GetModelFromView, these methods are used as part of the mvc.getModel pipeline.
  • Factories are now used internally to construct the SitecoreContext, GlassHtml and GlassContext. This factory can be replaced using the static factory definitions on SitecoreContextFactory.Default, GlassContextProvider.Default and DependencyResolver.GlassHtmlFactory. Overriding these will allow you to decide when and how these services are created. For example you might have different mapping configurations for different sections of your site or your can customise how GlassHtml renders images.

We have also had a great contribution by Alexander Smagin. The Sitecore self mapper allows you to map the item currently being mapped to another model that is a property of the current class. He has blogged on creating composite models for mapping data, it is an interesting idea and worth a read.

For more information about this release then checkout the Releases page and also Nathanael Mann's blog post.

Glass needs your support!

Glass.Mappper.Sc is supported by the generous donations of the Glass.Mapper.Sc community! Their donations help fund the time, effort and hosting for the project.

These supporters are AMAZING and a huge thank you to all of you. You can find our list of supporters on the Rockstars page.

If you use Glass.Mapper.Sc and find it useful please consider supporting the project. Not only will you help the project but you could also get a discount on the Glass.Mapper.Sc training and join the Rockstars page.

Become a Rockstart