WIP - editing all variants at once, this is getting things wired up to display a content item, lots of TODOs added, models and mappings refactored, content apps put in c# model, etc...
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
using AutoMapper;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
using ContentVariation = Umbraco.Core.Models.ContentVariation;
|
||||
//using AutoMapper;
|
||||
//using Umbraco.Core;
|
||||
//using Umbraco.Core.Models;
|
||||
//using Umbraco.Web.Models.ContentEditing;
|
||||
//using ContentVariation = Umbraco.Core.Models.ContentVariation;
|
||||
|
||||
namespace Umbraco.Web.Models.Mapping
|
||||
{
|
||||
/// <summary>
|
||||
/// Used to map the <see cref="ContentItemDisplay"/> name from an <see cref="IContent"/> depending on it's variation settings
|
||||
/// </summary>
|
||||
internal class ContentItemDisplayNameResolver : IValueResolver<IContent, ContentItemDisplay, string>
|
||||
{
|
||||
public string Resolve(IContent source, ContentItemDisplay destination, string destMember, ResolutionContext context)
|
||||
{
|
||||
var culture = context.GetCulture();
|
||||
return source.ContentType.VariesByCulture() && culture != null
|
||||
? source.GetCultureName(culture)
|
||||
: source.Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
//namespace Umbraco.Web.Models.Mapping
|
||||
//{
|
||||
// /// <summary>
|
||||
// /// Used to map the <see cref="TabbedContentItem{ContentPropertyDisplay, IContent}"/> name from an <see cref="IContent"/> depending on it's variation settings
|
||||
// /// </summary>
|
||||
// internal class ContentItemDisplayNameResolver : IValueResolver<IContent, ContentVariationDisplay, string>
|
||||
// {
|
||||
// public string Resolve(IContent source, ContentVariationDisplay destination, string destMember, ResolutionContext context)
|
||||
// {
|
||||
// var culture = context.GetCulture();
|
||||
// return source.ContentType.VariesByCulture() && culture != null
|
||||
// ? source.GetCultureName(culture)
|
||||
// : source.Name;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user