Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rayyan 46 posts 238 karma points
    Mar 21, 2019 @ 12:33
    Rayyan
    0

    Umbraco 8, insert media image type property value

      @{
        var i = 0;
        var typedMultiMediaPicker = Model.Value<IEnumerable<IPublishedContent>>("slider");
    
        foreach (var item in typedMultiMediaPicker)
        {
          var itemClass = i++ == 0 ? "carousel-item active" : "carousel-item";
         <div class="@itemClass">
          <img class="d-block w-100" src="@item.Url" alt="">
        </div>
    // <h1>GET THE VALUE HERE</h1>
        }
    }
    

    enter image description here

  • Paul Seal 524 posts 2889 karma points MVP 7x c-trib
    Mar 21, 2019 @ 13:25
    Paul Seal
    100

    You should be able to use:

    <h1>@(item.Value<string>("heading"))</h1>
    
Please Sign in or register to post replies

Write your reply to:

Draft