Created
August 28, 2014 08:18
-
-
Save jbreuer/76d802851346b991af26 to your computer and use it in GitHub Desktop.
Nested Archetype. Doesn't seem to work.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var archetypeModel = this.GetPropertyValue<ArchetypeModel>("tourLocations"); | |
return archetypeModel.Select(x => | |
{ | |
return new TourLocation() | |
{ | |
Name = x.GetValue<string>("name"), | |
Translations = x.GetValue<ArchetypeModel>("translations").Select(y => | |
{ | |
return new Translation() | |
{ | |
Language = y.GetValue<string>("language"), | |
TranslationValue = y.GetValue<string>("translation"), | |
}; | |
} | |
), | |
StartDate = x.GetValue<DateTime>("startDate"), | |
EndDate = x.GetValue<DateTime>("endDate"), | |
Link = x.GetValue<UrlPicker.Umbraco.Models.UrlPicker>("link"), | |
AllowOption = GetAllowOption(x.GetValue<Picker>("allowOption")), | |
AllowLanguages = x.GetValue<ArchetypeModel>("allowLanguages").Select(y => y.GetValue<string>("name")), | |
Location = x.GetValue<GoogleMaps>("location") | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment