I would like to fetch an imagefield from the multivalue Embedded Schema Field. Here is my code.

@foreach(var banners in Fields.Banners)
  @if(banners.RDBannerSchema.WebBannerImage.ID !=null)
      <img src="@banners.RDBannerSchema.WebBannerImage.ID" alt="" />
      <div class="blockCont">
        <div class="overCont">
             <a href="javascript:;">@blocks.Fields.LinkText</a>

When I render this page I got error Message.

System.Collections.Generic.List<Tridion.Extensions.Mediators.Razor.Models.ComponentModel>' does not contain a definition for 'ID']

In Anguilla

2 Answers 2


I Found the answer for this issue. Thanks http://codedweapon.com/

@foreach (var embeddedFields in Fields.SomeEmbeddedFields) {
  <div class="@(embeddedFields.IsLast ? "last" : String.Empty)">@embeddedFields.Address (@embeddedFields.ZipCode)</div>



You can fatch the image value like this @if (Component.Fields.thumbnail != null) { @Component.Fields.thumbnail.Fields.alt }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.