Lets take a look at what was included in todays release.

Map It!

Todays release contains an new method on the ISitecoreService interface called Map. This method allows you to map data to already instatiated objects. You can use this when mapping objects from third party systems of Sitecore 7 search, find out more in the Sitecore 7 Search Tutorial.

Anonymous Types

In this release we have simplified the syntax for making fields editable. You now don't have to use RenderLink or RenderImage you can use the Editable method:


You can now also use annoymous types to define attributes that should be passed to the render field pipeline in edit mode and the attributes that appear on the HTML element:

    @Editable(x=>x.FeaturedImage, new {@class="image-border", w="50"})

Interface Me

We have added the GetItemWithInterface method to the ISitecoreService class. This method allows you to throw a whole set of interfaces at Glass.Mapper and it will return a concrete type that represents these interfaces. The following code shows how this works:

            var result = SitecoreContext.GetItemWithInterfaces<IPage, IContent, IFeature>("/sitecore/content/home");
            var page = result as IPage;
            var content = result as IContent;
            var feature = result as IFeature;

This can be really useful when you don't want to create a type that aggregates the interfaces.

And more

These are the major changes in this release. There are a couple more smaller changes, check them out on the release page.