I know I've done this before but I just don't remember the proper syntax. I have a page where the model is EventItem
, and EventItem
has a list of EventSpeakers
and each speaker has an image field. I want to make the images editable in Experience Editor.
@foreach (var person in Model.EventSpeakers){
<div class="speaker">
@Editable(??? => x.Speaker_Image)
</div>
}
If I do @Editable(x => x.Speaker_Image)
that doesn't work, because x
is an EventItem
and not an EventSpeaker
. How do I specify that x
is person
and not the page Model?