Copied to clipboard

Flag this post as spam?

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


  • Bora B 32 posts 124 karma points
    Mar 20, 2016 @ 12:35
    Bora B
    0

    Nested Content Media Picker Issue

    I have the following code. "gorsel" is a media picker. I cannot get the URL of the media picker.

    Need help please. Thanks :)

    @inherits Umbraco.Web.Mvc.UmbracoViewPage
    
    var items = Model.GetPropertyValue<IEnumerable<IPublishedContent>>("paragraf");
                            @foreach (var item in items)
                            {
                                var gorsel = item.GetPropertyValue("gorsel");
                                    <div class="text-image-content closed">
                                        <h2>@item.GetPropertyValue("araBaslik")</h2>
                                        <div class="text-container">
                                            <div class="clear"></div>
                                            <div class="img-align-left"><img src="@Umbraco.Media(gorsel).UmbracoFile" alt="" title="" /></div>
                                            @Html.Raw(item.GetPropertyValue("metin"))
                                            <div class="clear"></div>
                                        </div>
                                    </div>
    
                            }
    
  • Bora B 32 posts 124 karma points
    Mar 20, 2016 @ 16:27
    Bora B
    100

    found the solution myself :)

    the media was not selected and returning null..

    after selecting a media it worked..

    Thx

  • Elin 45 posts 166 karma points
    Sep 18, 2017 @ 19:17
    Elin
    0

    What did you do to select the media ?

    Can you please share the code you used to render the media picker, I'm having the same issue.

Please Sign in or register to post replies

Write your reply to:

Draft