Variant names, availability, etc
This commit is contained in:
@@ -22,7 +22,7 @@ namespace Umbraco.Web.Models.Mapping
|
||||
public IEnumerable<ContentVariation> Resolve(IContent source, ContentItemDisplay destination, IEnumerable<ContentVariation> destMember, ResolutionContext context)
|
||||
{
|
||||
var allLanguages = _localizationService.GetAllLanguages().OrderBy(x => x.Id).ToList();
|
||||
if (allLanguages.Count == 0) return Enumerable.Empty<ContentVariation>();
|
||||
if (allLanguages.Count == 0) return Enumerable.Empty<ContentVariation>();
|
||||
|
||||
var langs = context.Mapper.Map<IEnumerable<ILanguage>, IEnumerable<Language>>(allLanguages, null, context);
|
||||
var variants = langs.Select(x => new ContentVariation
|
||||
@@ -30,7 +30,7 @@ namespace Umbraco.Web.Models.Mapping
|
||||
Language = x,
|
||||
Mandatory = x.Mandatory,
|
||||
//fixme these all need to the variant values but we need to wait for the db/service changes
|
||||
Name = source.Name ,
|
||||
Name = source.GetName(x.IsoCode),
|
||||
Exists = source.HasVariation(x.Id), //TODO: This needs to be wired up with new APIs when they are ready
|
||||
PublishedState = source.PublishedState.ToString(),
|
||||
//Segment = ?? We'll need to populate this one day when we support segments
|
||||
|
||||
Reference in New Issue
Block a user