section mapper

This commit is contained in:
perploug
2013-10-09 15:04:30 +02:00
parent 2ff5b63089
commit 2d3cf3da23
2 changed files with 6 additions and 2 deletions

View File

@@ -2,6 +2,7 @@
using Umbraco.Core;
using Umbraco.Core.Models.Mapping;
using Umbraco.Web.Models.ContentEditing;
using umbraco;
namespace Umbraco.Web.Models.Mapping
{
@@ -10,6 +11,9 @@ namespace Umbraco.Web.Models.Mapping
public override void ConfigureMappings(IConfiguration config, ApplicationContext applicationContext)
{
config.CreateMap<Section, Core.Models.Section>()
.ForMember(
dto => dto.Name,
expression => expression.MapFrom(section => ui.Text("sections", section.Alias)))
.ReverseMap(); //backwards too!
}
}