Copied to clipboard

Flag this post as spam?

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


  • C Andreasson 79 posts 207 karma points
    Oct 31, 2013 @ 19:12
    C Andreasson
    0

    Media Picker

    Hi I have tryed this code but

     

     

     I only get this out:

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Oct 31, 2013 @ 19:27
    Jeavon Leopold
    1

    Hi,

    I think maybe the only issue you have is a lower case f in "umbracoFile", try this:

    if (CurrentPage.HasValue("image_1")){
        var dynamicMediaItem = Umbraco.Media(CurrentPage.image_1);
        <img src="@dynamicMediaItem.umbracoFile" alt="@dynamicMediaItem.Name"/>
    }
    

    Jeavon

  • Fuji Kusaka 2203 posts 4220 karma points
    Oct 31, 2013 @ 19:30
    Fuji Kusaka
    0

    Havent used v6 yet but i guess you need to do somthing like this change umbracofile to umbracoFile with uppercase "F"

  • Fuji Kusaka 2203 posts 4220 karma points
    Oct 31, 2013 @ 19:32
    Fuji Kusaka
    0

    @Jeavon you're too quick!! :)

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Oct 31, 2013 @ 19:33
    Jeavon Leopold
    0

    @Fuji, I wrote the documentation, so wanted to check it was right :-)

  • C Andreasson 79 posts 207 karma points
    Oct 31, 2013 @ 19:42
    C Andreasson
    0

    Yes yes  ;-))) thank you

  • C Andreasson 79 posts 207 karma points
    Oct 31, 2013 @ 19:44
    C Andreasson
    0

    it's a really good documentation. It was only when I found it I could figure it out;-) thank you so much ;-)

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Oct 31, 2013 @ 19:46
    Jeavon Leopold
    0

    That's great to hear, actually I had never tried it before in a MacroPartialView as I wrote it in v4.11 (for Views and Partials) long before MacroPartialViews existed :-)

Please Sign in or register to post replies

Write your reply to:

Draft