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 428 posts 2354 karma points MVP 3x c-trib
    Mar 21, 2019 @ 13:25
    Paul Seal
    100

    You should be able to use:

    <h1>@(item.Value<string>("heading"))</h1>
    
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies